-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
206 additions
and
207 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,64 +11,64 @@ name: 'MATLAB: test and coverage' | |
# If tests pass, uploads coverage to codecov | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ['*'] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ['*'] | ||
|
||
jobs: | ||
matlab_tests: | ||
matlab_tests: | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
version: [R2021a, R2023b] | ||
include: | ||
- os: macos-latest | ||
version: R2023b | ||
fail-fast: false # Don't cancel all jobs if one fails | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
version: [R2021a, R2023b] | ||
include: | ||
- os: macos-latest | ||
version: R2023b | ||
fail-fast: false # Don't cancel all jobs if one fails | ||
|
||
runs-on: ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- name: Install MATLAB | ||
uses: matlab-actions/[email protected] | ||
with: | ||
release: ${{ matrix.version }} | ||
steps: | ||
- name: Install MATLAB | ||
uses: matlab-actions/[email protected] | ||
with: | ||
release: ${{ matrix.version }} | ||
|
||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 1 | ||
- 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: 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/[email protected] | ||
with: | ||
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run run_tests_ci; | ||
- name: Run tests | ||
uses: matlab-actions/[email protected] | ||
with: | ||
command: cd(fullfile(getenv('GITHUB_WORKSPACE'), '.github', 'workflows')); run run_tests_ci; | ||
|
||
- name: Check logs unix | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
run: grep -q 0 test_report.log || { echo "Some tests failed. Check the 'Run tests' step to know which ones." >&2; exit 1; } | ||
- name: Check logs windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
if (-not (Get-Content test_report.log | Select-String -Pattern "0")) { | ||
throw "Some tests failed. Check the 'Run tests' step to know which ones." | ||
} | ||
- name: Check logs unix | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
run: grep -q 0 test_report.log || { echo "Some tests failed. Check the 'Run tests' step to know which ones." >&2; exit 1; } | ||
- name: Check logs windows | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
if (-not (Get-Content test_report.log | Select-String -Pattern "0")) { | ||
throw "Some tests failed. Check the 'Run tests' step to know which ones." | ||
} | ||
- name: Code coverage | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
- name: Code coverage | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
# no coverage on windows as long as MOcov does not support it | ||
# see https://github.com/MOcov/MOcov/issues/28 | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: coverage.xml # optional | ||
flags: ${{ matrix.os }}_matlab-${{ matrix.version }} | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: false # optional (default = false) | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
file: coverage.xml # optional | ||
flags: ${{ matrix.os }}_matlab-${{ matrix.version }} | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: false # optional (default = false) | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,34 +2,34 @@ | |
name: 'Octave: test and coverage' | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ['*'] | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: ['*'] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 1 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
fetch-depth: 1 | ||
|
||
- name: MOxUnit Action | ||
uses: joergbrech/[email protected] | ||
with: | ||
tests: tests | ||
src: src | ||
with_coverage: true | ||
cover_xml_file: coverage.xml | ||
- name: MOxUnit Action | ||
uses: joergbrech/[email protected] | ||
with: | ||
tests: tests | ||
src: src | ||
with_coverage: true | ||
cover_xml_file: coverage.xml | ||
|
||
- name: Code coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
file: coverage.xml # optional | ||
flags: octave # optional | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: false # optional (default = false) | ||
- name: Code coverage | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
file: coverage.xml # optional | ||
flags: octave # optional | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: false # optional (default = false) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,14 +2,14 @@ | |
name: pre-commit | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
pre-commit: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] |
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
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
Oops, something went wrong.