Skip to content

Update codecov.yml

Update codecov.yml #4

Workflow file for this run

name: Code Cov CI
on:
push:
branches: [develop] # Trigger workflow on push to master
pull_request:
branches: [develop]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Set up MATLAB
- name: Set up MATLAB
uses: matlab-actions/setup-matlab@v1
with:
release: R2022a # Specify the MATLAB version
# Run only the specific test_myfunction.m file from the /tests directory
- name: Run MATLAB tests and generate coverage
run: |
matlab -batch "coverageReport = matlab.unittest.plugins.codecoverage.CoverageReport('coverage'); runtests('tests/test_myfunction.m', 'CoverageReport', coverageReport);"
# Upload coverage report to Codecov
- name: Upload coverage to Codecov
run: |
bash <(curl -s https://codecov.io/bash)
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}