Merge #1441 #2541
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: OS Unit Tests | |
on: | |
push: | |
branches: | |
- staging | |
- trying | |
jobs: | |
test-os: | |
timeout-minutes: 80 | |
strategy: | |
fail-fast: true # temporarily disabled while experiencing windows issue. | |
matrix: | |
os: [ubuntu-20.04, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
CLIMATEMACHINE_SETTINGS_FIX_RNG_SEED: "true" | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Checkout | |
uses: actions/[email protected] | |
# Setup a filter and only run if src/ test/ folder content changes | |
# or project depedencies | |
- uses: dorny/paths-filter@v2 | |
id: filter | |
with: | |
filters: | | |
run_test: | |
- '.github/workflows/OS-UnitTests.yml' | |
- 'src/**' | |
- 'test/**' | |
- 'Project.toml' | |
- 'Manifest.toml' | |
- name: Set up Julia | |
uses: julia-actions/setup-julia@v1 | |
if: steps.filter.outputs.run_test == 'true' | |
with: | |
version: 1.9 | |
- name: Cache artifacts | |
uses: julia-actions/cache@v1 | |
if: steps.filter.outputs.run_test == 'true' | |
- name: Build package | |
uses: julia-actions/julia-buildpkg@v1 | |
if: steps.filter.outputs.run_test == 'true' | |
- name: Run Unit Tests | |
run: julia --project -e 'using Pkg; Pkg.test()' | |
if: steps.filter.outputs.run_test == 'true' |