Skip to content

Commit

Permalink
[CI] Some improvements (#101)
Browse files Browse the repository at this point in the history
* [CI] Some improvements

* add concurrency group
* add timeout
* use `julia-actions/cache`
  • Loading branch information
giordano authored Jan 23, 2024
1 parent e67eb1c commit 425b135
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@
name: CI

on:
pull_request:
push:
branches:
- master
tags: '*'

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
Expand All @@ -24,20 +33,11 @@ jobs:
- x64
steps:
- uses: actions/checkout@v4
- uses: julia-actions/cache@v1
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
- uses: julia-actions/julia-processcoverage@v1
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ on:
tags: '*'
pull_request:

concurrency:
# Skip intermediate builds: always.
# Cancel intermediate builds: always.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- uses: actions/checkout@v4
- uses: julia-actions/cache@v1
- uses: julia-actions/setup-julia@v1
with:
version: '1.6'
Expand Down

0 comments on commit 425b135

Please sign in to comment.