Skip to content

Commit c676134

Browse files
authored
Fix GitHub Actions conformance builds after adding ignored tests to report (#153)
1 parent a51ca6d commit c676134

File tree

1 file changed

+31
-4
lines changed

1 file changed

+31
-4
lines changed

.github/workflows/ci_build_test.yml

Lines changed: 31 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ jobs:
8484
key: ${{ github.sha }}
8585
# Conformance report generation and comparison report generation job will run only after the `Build and Test` job
8686
# succeeds.
87-
conformance:
88-
name: Check conformance
87+
conformance-report:
88+
name: Create conformance report for `push` and `pull_request` events
8989
runs-on: ubuntu-latest
9090
needs: [build]
9191
steps:
@@ -118,6 +118,35 @@ jobs:
118118
uses: actions/upload-artifact@v3
119119
with:
120120
path: cts_report.json
121+
# Cache the `cargo build` and conformance report for `conformance-report-comparison` job (pull_request event only)
122+
- name: Cache `cargo build` and conformance report
123+
if: github.event_name == 'pull_request'
124+
uses: actions/cache@v2
125+
id: restore-build-and-conformance
126+
with:
127+
path: ./*
128+
key: ${{ github.sha }}-conformance-report
129+
conformance-report-comparison:
130+
name: Create comparison report for `pull_request` event
131+
runs-on: ubuntu-latest
132+
needs: [conformance-report]
133+
if: github.event_name == 'pull_request'
134+
steps:
135+
# Pull down cached `cargo build` and conformance report
136+
- uses: actions/checkout@v2
137+
with:
138+
submodules: recursive
139+
- name: Rust Toolchain
140+
uses: actions-rs/toolchain@v1
141+
with:
142+
profile: minimal
143+
toolchain: stable
144+
override: true
145+
- uses: actions/cache@v2
146+
id: restore-build-and-conformance
147+
with:
148+
path: ./*
149+
key: ${{ github.sha }}-conformance-report
121150
# Download conformance report from `main` to create comparison report. If `main` has no report, use a backup
122151
# report (stored in partiql-conformance-tests/backup_conformance_report.json). Alternatively, we could consider
123152
# - pulling `main` branch and rerun the tests
@@ -143,7 +172,6 @@ jobs:
143172
- name: Find Comment
144173
uses: peter-evans/find-comment@v2
145174
id: fc
146-
if: github.event_name == 'pull_request'
147175
with:
148176
issue-number: ${{ github.event.pull_request.number }}
149177
comment-author: 'github-actions[bot]'
@@ -159,7 +187,6 @@ jobs:
159187
# Create or update (if previous comment exists) with markdown version of comparison report
160188
- name: Create or update comment
161189
uses: peter-evans/create-or-update-comment@v2
162-
if: github.event_name == 'pull_request'
163190
with:
164191
comment-id: ${{ steps.fc.outputs.comment-id }}
165192
issue-number: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)