@@ -10,15 +10,17 @@ jobs:
1010 fail-fast : false
1111 matrix :
1212 os : [ "ubuntu", "windows", "macos" ]
13- go : [ "1.18 .x", "1.19 .x" ]
13+ go : ["1.19 .x","1.20 .x"]
1414 env :
1515 COVERAGES : " "
16- runs-on : ${{ format('{0}-latest', matrix.os) }}
16+ runs-on : ${{ fromJSON(vars[ format('UCI_GO_TEST_RUNNER_ {0}', matrix.os)] || format('"{0} -latest" ', matrix.os) ) }}
1717 name : ${{ matrix.os }} (go ${{ matrix.go }})
1818 steps :
1919 - uses : actions/checkout@v3
2020 with :
2121 submodules : recursive
22+ - id : config
23+ uses : protocol/.github/.github/actions/read-config@master
2224 - uses : actions/setup-go@v3
2325 with :
2426 go-version : ${{ matrix.go }}
2729 go version
2830 go env
2931 - name : Use msys2 on windows
30- if : ${{ matrix.os == 'windows' }}
32+ if : matrix.os == 'windows'
3133 shell : bash
3234 # The executable for msys2 is also called bash.cmd
3335 # https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#shells
@@ -38,31 +40,37 @@ jobs:
3840 uses : ./.github/actions/go-test-setup
3941 if : hashFiles('./.github/actions/go-test-setup') != ''
4042 - name : Run tests
43+ if : contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
41444245 with :
4346 # Use -coverpkg=./..., so that we include cross-package coverage.
4447 # If package ./A imports ./B, and ./A's tests also cover ./B,
4548 # this means ./B's coverage will be significantly higher than 0%.
4649 run : go test -v -shuffle=on -coverprofile=module-coverage.txt -coverpkg=./... ./...
4750 - name : Run tests (32 bit)
48- if : ${{ matrix.os != 'macos' }} # can't run 32 bit tests on OSX.
51+ # can't run 32 bit tests on OSX.
52+ if : matrix.os != 'macos' &&
53+ fromJSON(steps.config.outputs.json).skip32bit != true &&
54+ contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
49555056 env :
5157 GOARCH : 386
5258 with :
5359 run : |
54- export "PATH=${{ env. PATH_386 }} :$PATH"
60+ export "PATH=$PATH_386:$PATH"
5561 go test -v -shuffle=on ./...
5662 - name : Run tests with race detector
57- if : ${{ matrix.os == 'ubuntu' }} # speed things up. Windows and OSX VMs are slow
63+ # speed things up. Windows and OSX VMs are slow
64+ if : matrix.os == 'ubuntu' &&
65+ contains(fromJSON(steps.config.outputs.json).skipOSes, matrix.os) == false
58665967 with :
6068 run : go test -v -race ./...
6169 - name : Collect coverage files
6270 shell : bash
6371 run : echo "COVERAGES=$(find . -type f -name 'module-coverage.txt' | tr -s '\n' ',' | sed 's/,$//')" >> $GITHUB_ENV
6472 - name : Upload coverage to Codecov
65- uses : codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # v3.1.0
73+ uses : codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # v3.1.1
6674 with :
6775 files : ' ${{ env.COVERAGES }}'
6876 env_vars : OS=${{ matrix.os }}, GO=${{ matrix.go }}
0 commit comments