-
Notifications
You must be signed in to change notification settings - Fork 17
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
2 changed files
with
79 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
name: Build msmbuilder2022 codecov | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# ignore changes to docs | ||
paths-ignore: | ||
- ./docs/* | ||
pull_request: | ||
branches: | ||
- main | ||
# ignore changes to docs | ||
paths-ignore: | ||
- ./docs/* | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-code: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
max-parallel: 6 | ||
matrix: | ||
python-version: ["3.12"] | ||
include: | ||
- os: ubuntu-latest | ||
path: ~/.cache/pip | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ${{ matrix.path }} | ||
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | ||
restore-keys: | | ||
${{ runner.os }}-pip- | ||
- uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
auto-activate-base: true | ||
auto-update-conda: true | ||
python-version: ${{ matrix.python-version }} | ||
activate-environment: test | ||
- name: Install required packages | ||
run: | | ||
conda config --add channels conda-forge | ||
# conda install -yq conda-build jinja2 conda-verify | ||
conda install -yq zlib | ||
conda install h5py | ||
python -m pip install --upgrade pip | ||
# conda update conda-build | ||
- name: Pip install | ||
run: | | ||
python -m pip install . | ||
- name: Test with pytest | ||
run: | | ||
conda install -yq numdifftools hmmlearn | ||
pip install pytest | ||
pip install pytest-cov | ||
mkdir ../../pkgs | ||
cp -r msmbuilder/tests ../../pkgs/ | ||
cd ../../pkgs | ||
python tests/data_init.py | ||
pytest tests --cov=msmbuilder --cov-report=xml:coverage.xml | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ../../pkgs/coverage.xml | ||
fail_ci_if_error: True | ||
verbose: True |
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
ignore: | ||
- "msmbuilder/tests" | ||
|
||
comment: | ||
layout: "reach, diff, flags, files" | ||
|