diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index dd12494..700aeca 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,6 +1,14 @@ name: Go on: [push, pull_request] jobs: + build: + name: Build on limited environment + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v2 + - name: build + run: docker-compose run go-json test: name: Test strategy: diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..d1aa385 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,13 @@ +version: '2' +services: + go-json: + image: golang:1.16 + volumes: + - '.:/go/src/go-json' + deploy: + resources: + limits: + memory: 2048M + working_dir: /go/src/go-json + command: | + sh -c "go test -c . && ls go-json.test"