Add Aqua to tests (#2257) #37
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 | |
pull_request: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.version == 'nightly' }} | |
strategy: | |
fail-fast: false | |
matrix: | |
test-args: | |
# Run some of the slower test files individually. The last one catches everything | |
# not included in the others. | |
- "essential/ad.jl" | |
- "mcmc/gibbs.jl" | |
- "mcmc/hmc.jl" | |
- "mcmc/abstractmcmc.jl" | |
- "mcmc/Inference.jl" | |
- "experimental/gibbs.jl" | |
- "mcmc/ess.jl" | |
- "--skip essential/ad.jl mcmc/gibbs.jl mcmc/hmc.jl mcmc/abstractmcmc.jl mcmc/Inference.jl experimental/gibbs.jl mcmc/ess.jl" | |
version: | |
- '1.7' | |
- '1' | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macOS-latest | |
arch: | |
- x64 | |
- x86 | |
num_threads: | |
- 1 | |
- 2 | |
exclude: | |
# With Windows and macOS, only run Julia 1.7, x64, 2 threads. We just want to see | |
# some combination work on OSes other than Ubuntu. | |
- os: windows-latest | |
version: '1' | |
- os: macOS-latest | |
version: '1' | |
- os: windows-latest | |
arch: x86 | |
- os: macOS-latest | |
arch: x86 | |
- os: windows-latest | |
num_threads: 1 | |
- os: macOS-latest | |
num_threads: 1 | |
# It's sufficient to test x86 with one version of Julia and one thread. | |
- version: '1' | |
arch: x86 | |
- num_threads: 2 | |
arch: x86 | |
steps: | |
- name: Print matrix variables | |
run: | | |
echo "OS: ${{ matrix.os }}" | |
echo "Architecture: ${{ matrix.arch }}" | |
echo "Julia version: ${{ matrix.version }}" | |
echo "Number of threads: ${{ matrix.num_threads }}" | |
echo "Test arguments: ${{ matrix.test-args }}" | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
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@latest | |
- name: Call Pkg.test | |
run: julia --color=yes --depwarn=yes --check-bounds=yes --threads=${{ matrix.num_threads }} --project=@. -e 'import Pkg; Pkg.test(; test_args=ARGS)' -- ${{ matrix.test-args }} |