Skip to content

Merge Tests.yml and OscarTests.yml into one workflow #320

Merge Tests.yml and OscarTests.yml into one workflow

Merge Tests.yml and OscarTests.yml into one workflow #320

Workflow file for this run

name: Run tests
on:
push:
branches:
- master
tags: '*'
pull_request:
workflow_dispatch:
# needed to allow julia-actions/cache to delete old caches that it has created
permissions:
actions: write
contents: read
concurrency:
# group by workflow and ref; the last slightly strange component ensures that for pull
# requests, we limit to 1 concurrent job, but for the master branch we don't
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/master' || github.run_number }}
# Cancel intermediate builds, but only if it is a pull request build.
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 30
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1.8'
- '1.10'
- '1.11'
- '1.12-nightly'
- 'nightly'
oscar-version:
- 'stable'
- 'devel'
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
# For Codecov, we must also fetch the parent of the HEAD commit to
# be able to properly deal with PRs / merges
fetch-depth: 2
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.julia-version }}
- uses: julia-actions/cache@v2
- name: "Remove Oscar.jl compat"
if: ${{ matrix.oscar-version == 'devel' }}
shell: julia --color=yes {0}
run: |
using TOML
project = TOML.parsefile("Project.toml")
project["compat"]["Oscar"] = "1"
open("Project.toml", "w") do io
TOML.print(io, project)
end
- name: "Install OSCAR dev version"
if: ${{ matrix.oscar-version == 'devel' }}
shell: julia --project=. --color=yes {0}
run: |
using Pkg
Pkg.develop("Oscar")
Pkg.pin("Oscar")
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1
with:
depwarn: 'error'
- name: "Process code coverage"
uses: julia-actions/julia-processcoverage@v1
- name: "Upload coverage data to Codecov"
continue-on-error: true
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}