Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
svchb authored Oct 9, 2024
1 parent 1ce0460 commit 1774f5a
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ on:
- 'docs/**'
workflow_dispatch:


# Cancel redundant CI tests automatically
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -36,55 +35,62 @@ concurrency:
jobs:
build:
name: Run Tests (Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }})
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
# Don't cancel all running jobs when one job fails
fail-fast: false
matrix:
version:
- '1.9'
- '1.10'
- '1'
os:
- ubuntu-latest
arch:
- x64
include:
# Also run tests on Windows and macOS-ARM, but only with the latest Julia version
# TODO: change back to '1' after JuliaLang/julia#55009 has been backported
# Ubuntu jobs with Julia 1.9, 1.10, and 1.11
- version: '1.9'
os: ubuntu-latest
arch: x64
- version: '1.10'
os: ubuntu-latest
arch: x64
- version: '1'
os: ubuntu-latest
arch: x64
# Windows job with Julia 1.10
- version: '1.10'
os: windows-latest
arch: x64
# macOS ARM job with Julia 1.10
- version: '1.10'
os: macos-14
arch: arm64

steps:
- name: Check out project
uses: actions/checkout@v4

- name: Set up Julia
uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}

- uses: julia-actions/cache@v2

- name: Build package
uses: julia-actions/julia-buildpkg@v1

- name: Run unit tests
uses: julia-actions/julia-runtest@v1
with:
annotate: true
# Only run coverage in one Job (Ubuntu and latest Julia version)
# Only run coverage in the Ubuntu job with Julia 1.11
coverage: ${{ matrix.os == 'ubuntu-latest' && matrix.version == '1' }}
env:
TRIXIPARTICLES_TEST: unit

- name: Process coverage results
# Only run coverage in one Job (Ubuntu and latest Julia version)
# Only process coverage in the Ubuntu job with Julia 1.11
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
uses: julia-actions/julia-processcoverage@v1
with:
directories: src,test

- name: Upload coverage report to Codecov
# Only run coverage in one Job (Ubuntu and latest Julia version)
# Only upload coverage in the Ubuntu job with Julia 1.11
if: matrix.os == 'ubuntu-latest' && matrix.version == '1'
uses: codecov/codecov-action@v4
with:
Expand All @@ -93,6 +99,7 @@ jobs:
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Run example tests
uses: julia-actions/julia-runtest@v1
with:
Expand Down

0 comments on commit 1774f5a

Please sign in to comment.