Skip to content

Commit e9f33f0

Browse files
authored
add invalidations check CI (#241)
1 parent 0b02b54 commit e9f33f0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/invalidations.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Invalidations
2+
on: pull_request
3+
4+
jobs:
5+
evaluate:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- uses: julia-actions/setup-julia@v1
9+
with:
10+
version: 'nightly'
11+
- uses: actions/checkout@v2
12+
- uses: julia-actions/julia-buildpkg@latest
13+
- uses: julia-actions/julia-invalidations@v1
14+
id: invs_pr
15+
16+
- uses: actions/checkout@v2
17+
with:
18+
ref: 'master'
19+
- uses: julia-actions/julia-buildpkg@latest
20+
- uses: julia-actions/julia-invalidations@v1
21+
id: invs_master
22+
23+
- name: Report invalidation counts
24+
run: |
25+
echo "Invalidations on master: ${{ steps.invs_master.outputs.total }} (${{ steps.invs_master.outputs.deps }} via deps)"
26+
echo "This branch: ${{ steps.invs_pr.outputs.total }} (${{ steps.invs_pr.outputs.deps }} via deps)"
27+
shell: bash
28+
- name: PR doesn't increase number of invalidations
29+
run: |
30+
if (( ${{ steps.invs_pr.outputs.total }} > ${{ steps.invs_master.outputs.total }} )); then
31+
exit 1
32+
fi
33+
shell: bash

0 commit comments

Comments
 (0)