Repository navigation
73 lines (63 loc) · 2.3 KB
/
Copy pathci.yml
File metadata and controls
73 lines (63 loc) · 2.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: CI
on:
push:
branches: [ main ]
pull_request:
permissions:
contents: read
env:
# The conformance suite release this repo is vendored from and must report against.
BQ_CONFORMANCE_VERSION: "1.5.0"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ "17", "21" ]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-java@v6
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
# The conformance runner writes results.json (ADR-0032) when BQ_CONFORMANCE_RESULTS is set.
- name: Test
run: mvn -B --no-transfer-progress verify
env:
BQ_CONFORMANCE_RESULTS: ${{ runner.temp }}/results.json
- uses: actions/setup-python@v6
with:
python-version: "3.12"
# Schema-valid, no `fail`, bindings derived from the source tree, and every in-scope
# section and case present (an absent transport or section breaks CI).
- name: Validate results.json
run: |
python -m pip install --quiet jsonschema==4.23.0
python -I .github/scripts/check-conformance-results.py "$RUNNER_TEMP/results.json" \
src/test/resources/conformance "$BQ_CONFORMANCE_VERSION"
conformance:
name: Conformance suite in sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# fetch.sh downloads the release asset, verifies it against the release's SHA256SUMS and,
# with --check, fails if the vendored copy differs. It is taken from the same pinned tag.
- name: Verify vendored conformance matches the pinned release
run: |
curl -fsSL -o "$RUNNER_TEMP/fetch.sh" \
"https://raw.githubusercontent.com/BabelQueue/conformance/v${BQ_CONFORMANCE_VERSION}/fetch.sh"
bash "$RUNNER_TEMP/fetch.sh" --check "$BQ_CONFORMANCE_VERSION" src/test/resources/conformance
ci-green:
name: CI green
runs-on: ubuntu-latest
needs: [test, conformance]
if: ${{ always() }}
steps:
- name: Fail if any required job did not pass
run: |
if ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}; then
echo "A required job failed or was cancelled."
exit 1
fi