From a410882ada108b07a50039167c2417e1f7aac807 Mon Sep 17 00:00:00 2001 From: Oleg Jukovec Date: Wed, 29 Jun 2022 15:39:08 +0300 Subject: [PATCH] Add Ubuntu 22.04 runner to GitHub Actions go test workflow --- .github/workflows/go-test.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/go-test.yml b/.github/workflows/go-test.yml index b86241a9..17a16a08 100644 --- a/.github/workflows/go-test.yml +++ b/.github/workflows/go-test.yml @@ -9,11 +9,11 @@ jobs: strategy: fail-fast: false matrix: - os: [ "ubuntu", "windows", "macos" ] + os: [ "ubuntu-22.04", "ubuntu-latest", "windows-latest", "macos-latest" ] go: [ "1.17.x", "1.18.x" ] env: COVERAGES: "" - runs-on: ${{ format('{0}-latest', matrix.os) }} + runs-on: ${{ matrix.os }} name: ${{ matrix.os }} (go ${{ matrix.go }}) steps: - uses: actions/checkout@v2 @@ -27,7 +27,7 @@ jobs: go version go env - name: Use msys2 on windows - if: ${{ matrix.os == 'windows' }} + if: startsWith(matrix.os, 'windows') shell: bash # The executable for msys2 is also called bash.cmd # /~https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells @@ -45,7 +45,7 @@ jobs: # this means ./B's coverage will be significantly higher than 0%. run: go test -v -coverprofile=module-coverage.txt -coverpkg=./... ./... - name: Run tests (32 bit) - if: ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX. + if: startsWith(matrix.os, 'macos') # can't run 32 bit tests on OSX. uses: protocol/multiple-go-modules@v1.2 env: GOARCH: 386 @@ -54,7 +54,7 @@ jobs: export "PATH=${{ env.PATH_386 }}:$PATH" go test -v ./... - name: Run tests with race detector - if: ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow + if: startsWith(matrix.os, 'ubuntu') # speed things up. Windows and OSX VMs are slow uses: protocol/multiple-go-modules@v1.2 with: run: go test -v -race ./...