| 1 | # Used by Google Cloud Build to run cel-go conformance tests and generate necessary file structure for TestGrid dashboard in Google Cloud Storage |
| 2 | steps: |
| 3 | # - name: 'ubuntu' |
| 4 | # # writes start time and #PR to started.json |
| 5 | # args: ['bash', 'conformance/start.sh', '$COMMIT_SHA'] |
| 6 | # # Because testgrid uses monotonically increasing, numerical ids as folder names and GCB generates random ids, the timestamp |
| 7 | # # at start is recorded and written to a file, then read at the end to ensure monotonically increasing numbers. |
| 8 | # - name: 'ubuntu' |
| 9 | # # stores timestamp in _DATE to use as build id |
| 10 | # args: ['bash', '-c', 'date +%Y%m%d%H%M%S > _DATE' ] # Will create folder of format YYYYMMDDHHMMSS |
| 11 | # - name: 'gcr.io/cloud-builders/gsutil' |
| 12 | # # writes _DATE to GCS bucket so it can be used as GCS folder name |
| 13 | # args: ['cp', '-r', '_DATE', 'gs://cel-conformance'] |
| 14 | # - name: 'gcr.io/cloud-builders/bazel' |
| 15 | # # run conformance tests with bazel |
| 16 | # args: ['test', '--test_output=all', 'conformance/ct_dashboard'] |
| 17 | # - name: 'ubuntu' |
| 18 | # # creates necessary format and folder structure for TestGrid to parse |
| 19 | # args: ['bash', 'conformance/zip.sh'] |
| 20 | # - name: 'gcr.io/cloud-builders/gsutil' |
| 21 | # entrypoint: sh |
| 22 | # # deploys folder of test results (with build id as folder name) to GCS |
| 23 | # args: ['-c', 'gsutil cp -r $(cat _DATE) gs://cel-conformance/test-logs/'] |
| 24 | - name: 'golang:1.23.0' |
| 25 | # check the integrity of the vendor directory |
| 26 | args: ['scripts/verify-vendor.sh'] |
| 27 | - name: 'gcr.io/cloud-builders/bazel:7.3.2' |
| 28 | entrypoint: bazel |
| 29 | args: |
| 30 | - 'test' |
| 31 | - '--enable_bzlmod' |
| 32 | - '--test_output=errors' |
| 33 | - '--google_default_credentials' |
| 34 | - '--remote_cache=https://storage.googleapis.com/cel-go-remote-cache' |
| 35 | - '...' |
| 36 | id: bazel-test |
| 37 | waitFor: ['-'] |
| 38 | timeout: 10m |
| 39 | options: |
| 40 | machineType: 'E2_HIGHCPU_32' |