[pre-commit.ci] pre-commit autoupdate (#70) #158
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: 'MATLAB: test and coverage' | |
# Installs | |
# - MATLAB | |
# - MOXunit | |
# - MOcov | |
# run .github/workflows/tests_matlab.m | |
# If tests pass, uploads coverage to codecov | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
pull_request: | |
branches: | |
- '*' | |
jobs: | |
matlab_tests: | |
strategy: | |
matrix: | |
version: [R2021a, R2022a, R2023a] | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Install MAT | |
uses: matlab-actions/setup-matlab@v2.2.0 | |
with: | |
release: ${{ matrix.version }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 1 | |
- name: Install Moxunit and MOcov | |
run: | | |
git clone https://github.com/MOxUnit/MOxUnit.git --depth 1 | |
git clone https://github.com/MOcov/MOcov.git --depth 1 | |
- name: Run tests | |
uses: matlab-actions/run-command@v2.1.1 | |
with: | |
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run run_tests_ci; | |
- name: Code coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
file: coverage.xml | |
flags: ${{ matrix.os }}_matlab-${{ matrix.version }} | |
name: codecov-umbrella | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |