Skip to content

Unit test

Unit test #440

Workflow file for this run

name: Unit test
on:
create:
tags:
push:
branches:
- master
pull_request:
defaults:
run:
shell: bash
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'
- 'nightly'
os:
- ubuntu-latest
arch:
- x64
include:
- os: windows-latest
version: '1'
arch: x64
- os: macOS-latest
version: '1'
arch: x64
steps:
- uses: actions/checkout@v3
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
- name: "Set up Julia"
uses: julia-actions/setup-julia@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- name: "Cache artifacts"
uses: actions/cache@v3
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
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 }}-
- name: "Build packages"
uses: julia-actions/julia-buildpkg@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
- name: "Run Unit Test without Coverage Report"
uses: julia-actions/julia-runtest@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
if: ${{ !contains(fromJson('["1", "1.6"]'), matrix.version) || matrix.os != 'ubuntu-latest' }}
with:
coverage: false
- name: "Run Unit Test with Coverage Report"
uses: julia-actions/julia-runtest@v1
continue-on-error: ${{ matrix.julia-version == 'nightly' }}
if: contains(fromJson('["1", "1.6"]'), matrix.version) && matrix.os == 'ubuntu-latest'
- uses: julia-actions/julia-processcoverage@v1
if: contains(fromJson('["1", "1.6"]'), matrix.version) && matrix.os == 'ubuntu-latest'
- name: "Code coverage"
uses: codecov/codecov-action@v3
if: contains(fromJson('["1", "1.6"]'), matrix.version) && matrix.os == 'ubuntu-latest'
with:
file: lcov.info