Skip to content

Commit b07d708

Browse files
authored
Update CI config (#25)
- cancel concurrent PR builds (we only care about the last one anyway) - use julia-actions/cache action - use v1 of julia-actions/julia-runtest, not latest, so we benefit from the usual semver protections against breaking changes
1 parent 039f6fe commit b07d708

1 file changed

Lines changed: 11 additions & 16 deletions

File tree

.github/workflows/CI.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,16 @@
11
name: CI
2+
23
on:
34
- push
45
- pull_request
6+
7+
concurrency:
8+
# group by workflow and ref; the last slightly strange component ensures that for pull
9+
# requests, we limit to 1 concurrent job, but for the master branch we don't
10+
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
11+
# Cancel intermediate builds, but only if it is a pull request build.
12+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
13+
514
jobs:
615
test:
716
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
@@ -28,22 +37,8 @@ jobs:
2837
version: ${{ matrix.version }}
2938
arch: ${{ matrix.arch }}
3039

31-
- uses: actions/cache@v3
32-
env:
33-
cache-name: cache-artifacts
34-
with:
35-
path: ~/.julia/artifacts
36-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
37-
restore-keys: |
38-
${{ runner.os }}-test-${{ env.cache-name }}-
39-
${{ runner.os }}-test-
40-
${{ runner.os }}-
41-
42-
- run: |
43-
git config --global user.name Tester
44-
git config --global user.email te@st.er
45-
46-
- uses: julia-actions/julia-runtest@latest
40+
- uses: julia-actions/cache@v1
41+
- uses: julia-actions/julia-runtest@v1
4742
continue-on-error: ${{ matrix.version == 'nightly' }}
4843
- name: "Process code coverage"
4944
uses: julia-actions/julia-processcoverage@v1

0 commit comments

Comments
 (0)