diff --git a/.github/workflows/go-check.yml b/.github/workflows/go-check.yml index 251f7fa..89f2231 100644 --- a/.github/workflows/go-check.yml +++ b/.github/workflows/go-check.yml @@ -16,7 +16,7 @@ jobs: submodules: recursive - uses: actions/setup-go@v3 with: - go-version: "1.19.x" + go-version: 1.19.x - name: Run repo-specific setup uses: ./.github/actions/go-check-setup if: hashFiles('./.github/actions/go-check-setup') != '' @@ -64,7 +64,7 @@ jobs: with: run: | git clean -fd # make sure there aren't untracked files / directories - go generate ./... + go generate -x ./... # check if go generate modified or added any files if ! $(git add . && git diff-index HEAD --exit-code --quiet); then echo "go generated caused changes to the repository:" diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index 8a1697b..c6350bb 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -10,9 +10,10 @@ jobs: fail-fast: false matrix: os: [ "ubuntu", "windows", "macos" ] - go: [ "1.18.x", "1.19.x" ] + go: ["1.18.x","1.19.x"] env: COVERAGES: "" + SKIP32BIT: false runs-on: ${{ format('{0}-latest', matrix.os) }} name: ${{ matrix.os }} (go ${{ matrix.go }}) steps: @@ -37,6 +38,13 @@ jobs: - name: Run repo-specific setup uses: ./.github/actions/go-test-setup if: hashFiles('./.github/actions/go-test-setup') != '' + - name: Read config + if: hashFiles('./.github/workflows/go-test-config.json') != '' + shell: bash + run: | + if jq -re .skip32bit ./.github/workflows/go-test-config.json; then + echo "SKIP32BIT=true" >> $GITHUB_ENV + fi - name: Run tests uses: protocol/multiple-go-modules@v1.2 with: @@ -45,7 +53,7 @@ jobs: # this means ./B's coverage will be significantly higher than 0%. run: go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./... - name: Run tests (32 bit) - if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. + if: matrix.os != 'macos' && env.SKIP32BIT == 'false' # can't run 32 bit tests on OSX. uses: protocol/multiple-go-modules@v1.2 env: GOARCH: 386 diff --git a/.github/workflows/release-check.yml b/.github/workflows/release-check.yml index fde81c1..ba85c4a 100644 --- a/.github/workflows/release-check.yml +++ b/.github/workflows/release-check.yml @@ -9,3 +9,5 @@ on: jobs: release-check: uses: protocol/.github/.github/workflows/release-check.yml@master + with: + go-version: 1.19.x