Update UnitTest.yml #132
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: Unit test | |
on: | |
create: | |
tags: | |
push: | |
branches: | |
- master | |
pull_request: | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
# allow-failure is not supported yet | |
# https://github.com/actions/toolkit/issues/399 | |
fail-fast: false | |
matrix: | |
julia-version: ['1.6', '1'] | |
os: [ubuntu-latest] | |
include: | |
- os: windows-latest | |
julia-version: '1' | |
- os: macOS-latest | |
julia-version: '1' | |
steps: | |
- uses: actions/checkout@v4 | |
- name: "Set up Julia" | |
uses: julia-actions/setup-julia@v2 | |
with: | |
version: ${{ matrix.julia-version }} | |
- name: Cache artifacts | |
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 }}- | |
- name: "Unit Test" | |
uses: julia-actions/julia-runtest@master | |
- uses: julia-actions/julia-processcoverage@v1 | |
- uses: codecov/codecov-action@v1 | |
with: | |
file: lcov.info | |
token: ${{ secrets.CODECOV_TOKEN }} |