Improve CI #593
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: ["master"] | |
paths: | |
- 'src/**/*' | |
- 'test/**/*' | |
pull_request: | |
paths: | |
- 'src/**/*' | |
- 'test/**/*' | |
workflow_dispatch: | |
jobs: | |
test: | |
name: Julia ${{ matrix.version }} on ${{ matrix.os }} (${{ matrix.arch }}) | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.version == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: ['1', '1.9', 'nightly'] | |
os: [ubuntu-latest, macOS-latest, windows-latest] | |
arch: [x64] | |
include: | |
- version: '1' | |
os: ubuntu-latest | |
arch: x64 | |
coverage: true | |
env: | |
CACHE_NAME: julia-${{ matrix.version }}-${{ matrix.arch }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: actions/cache@v4 | |
with: | |
path: | | |
~/.julia | |
~/.julia/artifacts | |
key: ${{ runner.os }}-${{ env.CACHE_NAME }}-${{ hashFiles('**/Project.toml', '**/Manifest.toml') }} | |
restore-keys: | | |
${{ runner.os }}-${{ env.CACHE_NAME }}- | |
${{ runner.os }}-julia-${{ matrix.version }}- | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Running elementary tests | |
run: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true, test_args=["--elementary"]);" | |
- name: Running compilation tests | |
run: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true, test_args=["--compilation"]);" | |
- name: Profile compiler passes | |
run: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true, test_args=["--profile"]);" | |
- name: Running `gibbs` tests | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true, test_args=["--gibbs"]);" | |
- name: Running `mcmchains` tests | |
uses: nick-fields/retry@v3 | |
with: | |
timeout_minutes: 10 | |
max_attempts: 3 | |
command: julia --color=yes --project=. -e "import Pkg; Pkg.instantiate(); Pkg.test(coverage=true, test_args=["--mcmchains"]);" | |
- uses: julia-actions/julia-processcoverage@v1 | |
if: matrix.coverage | |
- uses: codecov/codecov-action@v4 | |
if: matrix.coverage | |
with: | |
file: lcov.info | |
- uses: coverallsapp/github-action@master | |
if: matrix.coverage | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: lcov.info |