Skip to content

Use Chmy as backend #150

Use Chmy as backend

Use Chmy as backend #150

Workflow file for this run

# DEBUG: until registered, Chmy.jl needs to be explicitly added in "Run tests" (instead of using "legacy testing")
name: Unit Tests
on:
push:
branches:
- main
paths:
- '.github/workflows/UnitTests.yml'
- '**/*.toml'
- 'src/**'
- 'ext/**'
- 'test/**'
pull_request:
paths:
- '.github/workflows/UnitTests.yml'
- '**/*.toml'
- 'src/**'
- 'ext/**'
- 'test/**'
env:
JULIA_NUM_THREADS: 2
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
# - '1.9'
- '1' # Latest stable 1.x release of Julia
os:
- ubuntu-latest
- macOS-latest
- windows-latest
arch:
- x64
include:
- os: macos-14
arch: "aarch64"
version: "1"
# include:
# - version: 'nightly'
# os: ubuntu-latest
# arch: x64
# allow_failure: true
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v4
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 }}-
# --- legacy testing
# - uses: julia-actions/julia-buildpkg@latest
# - uses: julia-actions/julia-runtest@latest
# --- testing with un-registered Chmy.jl
- name: Run tests
run: |
julia -e 'println("--- :julia: Instantiating project")
using Pkg
Pkg.add(url="https://github.com/PTsolvers/Chmy.jl")
Pkg.develop(; path=pwd())'
julia -e 'println("+++ :julia: Running tests")
using Pkg
Pkg.test("FastIce"; coverage=true)'
# codecov
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false # or true if you want CI to fail when Codecov fails