name: checks on: push: branches: - 'main' pull_request: env: GOPROXY: https://goproxy.io,direct GOPATH: /go_path GOCACHE: /go_cache jobs: unit: runs-on: docker container: image: 'code.forgejo.org/oci/node:20-bookworm' steps: - name: cache go path id: cache-go-path uses: https://code.forgejo.org/actions/cache@v3 with: path: /go_path key: go_path-${{ github.repository }}-${{ github.ref_name }} restore-keys: | go_path-${{ github.repository }}- go_path- - name: cache go cache id: cache-go-cache uses: https://code.forgejo.org/actions/cache@v3 with: path: /go_cache key: go_cache-${{ github.repository }}-${{ github.ref_name }} restore-keys: | go_cache-${{ github.repository }}- go_cache- - uses: https://code.forgejo.org/actions/checkout@v4 - uses: https://code.forgejo.org/actions/setup-go@v5 with: go-version-file: go.mod - name: vet checks run: go vet -v ./... - name: build run: go build -v ./... - name: build without docker run: go build -tags WITHOUT_DOCKER -v ./... - name: unit test run: go test -v ./pkg/jobparser ./pkg/model ./pkg/exprparser integration: runs-on: lxc-bookworm needs: [unit] steps: - uses: https://code.forgejo.org/actions/checkout@v4 - uses: https://code.forgejo.org/actions/setup-go@v5 with: go-version-file: go.mod - name: apt install docker.io run: | export DEBIAN_FRONTEND=noninteractive apt-get update -qq apt-get -q install -qq -y docker.io - name: integration test run: go test -run=TestRunSkipped -v ./pkg/runner