test: update github actions CI and run tests on LTS
and pre
#1562
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
- dev | |
push: | |
branches: | |
- master | |
tags: | |
- '*' | |
jobs: | |
runtests: | |
name: Julia ${{ matrix.group }} - ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 50 | |
permissions: # needed for julia-actions/cache to delete old caches | |
actions: write | |
contents: read | |
continue-on-error: ${{ matrix.version == 'pre' || matrix.version == 'nightly' }} # the CI badge will still pass if 'pre' or 'nightly' fails | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- 'lts' # long-term support release | |
- '1' # latest stable 1.x release | |
- 'pre' # latest stable prerelease | |
# - 'nightly' # commented since too noisy + 'pre' allows testing upcoming versions | |
os: [ubuntu-latest] | |
arch: [x64] | |
group: | |
- ControlSystems | |
- ControlSystemsBase | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- uses: julia-actions/cache@v2 | |
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 | |
env: | |
GROUP: ${{ matrix.group }} | |
- uses: julia-actions/julia-processcoverage@v1 | |
with: | |
directories: src,lib/ControlSystemsBase/src,lib/ControlSystemsBase/ext | |
if: ${{ matrix.version == '1' }} | |
- uses: codecov/codecov-action@v5 | |
if: ${{ matrix.version == '1' }} | |
with: | |
file: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |