Add Codecov #173
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: run tests | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
ubuntu: | |
runs-on: ubuntu-latest | |
env: | |
FI_PROVIDER: "^psm3,psm3;ofi_rxd" | |
OMPI_MCA_mtl_ofi_provider_exclude: psm3 | |
steps: | |
- name: Setup EESSI | |
uses: eessi/github-action-eessi@v3 | |
with: | |
eessi_stack_version: "2023.06" | |
- name: Checkout repository | |
uses: actions/checkout@main | |
- name: Install dependencies | |
run: | | |
module load ESPResSo/4.2.1-foss-2023a | |
python3 -m venv --system-site-packages venv | |
source venv/bin/activate | |
python3 maintainer/configure_venv.py | |
python3 -m pip install -r requirements.txt | |
python3 -m pip install "pdoc==14.3" "pylint==3.0.3" "coverage==7.4.4" | |
deactivate | |
- name: Run testsuite | |
run: | | |
module load ESPResSo/4.2.1-foss-2023a | |
source venv/bin/activate | |
make pylint | |
make unit_tests COVERAGE=1 | |
#make functional_tests | |
make docs | |
make coverage_xml | |
deactivate | |
shell: bash | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: "./documentation" | |
name: documentation | |
retention-days: 2 | |
if-no-files-found: error | |
- name: Upload coverage to Codecov | |
if: ${{ github.repository == 'jngrad/pyMBE' }} | |
uses: codecov/codecov-action@v4 | |
with: | |
file: "./coverage.xml" | |
disable_search: true | |
env_vars: OS,PYTHON | |
fail_ci_if_error: false | |
flags: unittests | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true |