make a wrong commit to check the CI #117
Workflow file for this run
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 Tests and Code Coverage | |
on: | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout PR Code | |
uses: actions/checkout@v4 | |
- name: Merge PR with Develop | |
run: | | |
git fetch origin develop | |
git checkout -b test-branch | |
git merge origin/develop --no-edit | |
- name: Clone COBRA Toolbox | |
run: | | |
git clone https://github.com/opencobra/cobratoolbox.git cobratoolbox | |
- name: Run MATLAB Tests | |
run: | | |
matlab -batch "run('cobratoolbox/initCobraToolbox.m'); diary('test_results.txt'); run('cobratoolbox/testAll.m'); diary off;" | |
- name: Upload Test Report | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-report | |
path: test_results.txt | |
- name: Upload Coverage to Codecov | |
if: always() # Ensure it runs even if tests fail | |
uses: codecov/codecov-action@v3 | |
with: | |
files: CodeCovTestResults.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
flags: matlab | |
comment: true | |
- name: Upload Test Results to Codecov | |
if: always() | |
uses: codecov/test-results-action@v1 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |