@@ -208,9 +208,13 @@ jobs:
208208 fail-fast: false
209209 matrix:
210210 go-version:
211+ - 1.14.14
212+ - 1.15.8
211213 - "1.16"
212214 os:
213215 - ubuntu-18.04
216+ - macos-10.15
217+ - windows-2019
214218 runs-on: ${{ matrix.os }}
215219 defaults:
216220 run:
@@ -246,10 +250,21 @@ jobs:
246250 run: go generate ./...
247251 - name: Test
248252 run: go test ./...
253+ - if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/')
254+ && matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}
255+ name: Test with -race
256+ run: go test -race ./...
249257 - name: gorelease check
250258 run: go run golang.org/x/exp/cmd/gorelease
251259 - name: Check that git is clean post generate and tests
252260 run: test -z "$(git status --porcelain)" || (git status; git diff; false)
261+ - if: ${{ github.ref == 'refs/heads/master' }}
262+ name: Pull this commit through the proxy on master
263+ run: |-
264+ v=$(git rev-parse HEAD)
265+ cd $(mktemp -d)
266+ go mod init mod.com
267+ GOPROXY=https://proxy.golang.org go get -d cuelang.org/go/cmd/cue@$v
253268 - if: ${{ startsWith(github.ref, 'refs/heads/ci/') && failure() }}
254269 name: Post any failures for this matrix entry
255270 run: 'curl -f -s -n -H "Content-Type: application/json" --request POST --data
@@ -1178,7 +1193,9 @@ test: _#bashWorkflow & {
11781193 steps: [_#writeNetrcFile, _#installGo, _#checkoutCode, _#cacheGoModules, _#setGoBuildTags & {
11791194 _#tags: "long"
11801195 if: "${{ \(_#isMaster) }}"
1181- }, _#goGenerate, _#goTest, _#goReleaseCheck, _#checkGitClean, _#failCLBuild]
1196+ }, _#goGenerate, _#goTest, _#goTestRace & {
1197+ if: "${{ \(_#isMaster) || \(_#isCLCITestBranch) && matrix.go-version == '\(_#latestStableGo)' && matrix.os == '\(_#linuxMachine)' }}"
1198+ }, _#goReleaseCheck, _#checkGitClean, _#pullThroughProxy, _#failCLBuild]
11821199 }
11831200 mark_ci_success: {
11841201 "runs-on": _#linuxMachine
@@ -1387,8 +1404,8 @@ _#testStrategy: {
13871404 "fail-fast": false
13881405 matrix: {
13891406 // Use a stable version of 1.14.x for go generate
1390- "go-version": ["1.16"]
1391- os: [_#linuxMachine]
1407+ "go-version": [_#codeGenGo, _#latestStableGo, "1.16"]
1408+ os: [_#linuxMachine, _#macosMachine, _#windowsMachine ]
13921409 }
13931410}
13941411_#setGoBuildTags: _#step & {
@@ -1462,36 +1479,4 @@ _#tempCueckooGitDir: """
14621479 git config user.email
[email protected] 14631480 git config http.https://github.com/.extraheader "AUTHORIZATION: basic $(echo -n cueckoo:${{ secrets.CUECKOO_GITHUB_PAT }} | base64)"
14641481 """
1465-
1466- // The cueckoo/copybara Docker image to use
1467- _#cueckooCopybaraImage: "cueckoo/copybara:afc4ae03eed00b0c9d7415141cd1b5dfa583da7c"
1468-
1469- // Define the base command for copybara
1470- _#copybaraCmd: {
1471- """
1472- cd _scripts
1473- docker run --rm -v $PWD/cache:/root/copybara/cache -v $PWD:/usr/src/app --entrypoint="" \(_#cueckooCopybaraImage) bash -c " \\
1474- \tset -eu; \\
1475- \tgit config --global user.name cueckoo; \\
1476- \tgit config --global user.email
[email protected] ; \\
1477- \techo machine github.com login cueckoo password ${{ secrets.CUECKOO_GITHUB_PAT }} >> ~/.netrc; \\
1478- \techo machine review.gerrithub.io login cueckoo password ${{ secrets.CUECKOO_GERRITHUB_PASSWORD }} >> ~/.netrc; \\
1479- \tchmod 600 ~/.netrc; \\
1480- \tjava -jar /opt/copybara/copybara_deploy.jar migrate copy.bara.sky \(_#cmd); \\
1481- \t"
1482- """
1483- _#cmd: string
1484- }
1485- _#copybaraSteps: {
1486- let cmdCmd = _#cmd
1487- [_#checkoutCode, _#step & {
1488- name: _#name
1489- run: _#copybaraCmd & {
1490- _
1491- _#cmd: cmdCmd
1492- }
1493- }]
1494- _#name: string
1495- _#cmd: string
1496- }
14971482_#curl: "curl -f -s"
0 commit comments