Add downstream tests for TrixiShallowWater.jl #1
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
# Note: this file is inspired by the downstream testing facilities in the SciML ecosystem | |
# x-ref: https://github.com/SciML/SciMLBase.jl/blob/ffe68aebedee5915190623cb08160d7ef1fbcce0/.github/workflows/Downstream.yml | |
name: Downstream | |
on: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'CITATION.bib' | |
- 'CONTRIBUTING.md' | |
- 'LICENSE.md' | |
- 'NEWS.md' | |
- 'README.md' | |
- '.zenodo.json' | |
- '.github/workflows/benchmark.yml' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'benchmark/**' | |
# - 'docs/**' | |
- 'utils/**' | |
pull_request: | |
paths-ignore: | |
- 'AUTHORS.md' | |
- 'CITATION.bib' | |
- 'CONTRIBUTING.md' | |
- 'LICENSE.md' | |
- 'NEWS.md' | |
- 'README.md' | |
- '.zenodo.json' | |
- '.github/workflows/benchmark.yml' | |
- '.github/workflows/CompatHelper.yml' | |
- '.github/workflows/TagBot.yml' | |
- 'benchmark/**' | |
# - 'docs/**' | |
- 'utils/**' | |
workflow_dispatch: | |
# Cancel redundant CI tests automatically | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
# We could also include the Julia version as in | |
# name: ${{ matrix.trixi_test }} - ${{ matrix.os }} - Julia ${{ matrix.version }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
# to be more specific. However, that requires us updating the required CI tests whenever we update Julia. | |
name: ${{ matrix.trixi_test }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
version: | |
- '1.9' | |
os: | |
- ubuntu-latest | |
arch: | |
- x64 | |
package: | |
- TrixiShallowWater.jl | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: julia-actions/setup-julia@v1 | |
with: | |
version: ${{ matrix.version }} | |
arch: ${{ matrix.arch }} | |
- run: julia -e 'using InteractiveUtils; versioninfo(verbose=true)' | |
- uses: julia-actions/cache@v1 | |
- uses: julia-actions/julia-buildpkg@v1 | |
- name: Retrieve downstream package | |
uses: actions/checkout@v4 | |
with: | |
repository: trixi-framework/${{ matrix.package }} | |
path: downstream | |
- name: Load upstream package into downstream environment | |
shell: julia --color=yes --project=downstream {0} | |
run: | | |
using Pkg | |
Pkg.develop(PackageSpec(path=".")) | |
Pkg.update() | |
- name: Run downstream tests (without coverage) | |
shell: julia --color=yes --project=downstream {0} | |
run: | | |
using Pkg | |
Pkg.test(coverage=false) | |
env: | |
TRIXI_TEST: upstream |