Skip to content

Commit 7d25ee2

Browse files
committed
ci: re-enable full CI workflows
This undoes a number of the temporary changes made during the migration detailed in #1078. Signed-off-by: Paul Jolly <[email protected]> Change-Id: I45a41d97b519f345e36cb7ae42bc6645fb697719 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/520760 Unity-Result: CUEcueckoo <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
1 parent 59079b1 commit 7d25ee2

File tree

4 files changed

+98
-179
lines changed

4 files changed

+98
-179
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,13 @@ jobs:
3737
fail-fast: false
3838
matrix:
3939
go-version:
40+
- 1.14.14
41+
- 1.15.8
4042
- "1.16"
4143
os:
4244
- ubuntu-18.04
45+
- macos-10.15
46+
- windows-2019
4347
runs-on: ${{ matrix.os }}
4448
defaults:
4549
run:
@@ -75,10 +79,21 @@ jobs:
7579
run: go generate ./...
7680
- name: Test
7781
run: go test ./...
82+
- if: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/ci/')
83+
&& matrix.go-version == '1.15.8' && matrix.os == 'ubuntu-18.04' }}
84+
name: Test with -race
85+
run: go test -race ./...
7886
- name: gorelease check
7987
run: go run golang.org/x/exp/cmd/gorelease
8088
- name: Check that git is clean post generate and tests
8189
run: test -z "$(git status --porcelain)" || (git status; git diff; false)
90+
- if: ${{ github.ref == 'refs/heads/master' }}
91+
name: Pull this commit through the proxy on master
92+
run: |-
93+
v=$(git rev-parse HEAD)
94+
cd $(mktemp -d)
95+
go mod init mod.com
96+
GOPROXY=https://proxy.golang.org go get -d cuelang.org/go/cmd/cue@$v
8297
- if: ${{ startsWith(github.ref, 'refs/heads/ci/') && failure() }}
8398
name: Post any failures for this matrix entry
8499
run: 'curl -f -s -n -H "Content-Type: application/json" --request POST --data

cmd/cue/cmd/testdata/script/cmd_github.txt

Lines changed: 20 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)