-
Notifications
You must be signed in to change notification settings - Fork 0
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
87 additions
and
46 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 |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Test code (deprecated) | ||
|
||
on: | ||
push: | ||
branches-ignore: [ '*' ] # Prevents this workflow from running | ||
|
||
jobs: | ||
|
||
Test: | ||
|
||
runs-on: ${{ matrix.os }}-latest | ||
strategy: | ||
matrix: | ||
os: ["ubuntu", "macos", "windows"] | ||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
steps: | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install regular dependencies with conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
miniforge-version: "latest" | ||
environment-file: environment.yml | ||
activate-environment: test-env | ||
conda-remove-defaults: "true" | ||
|
||
- name: Install dev dependencies with conda | ||
run: | | ||
conda env update -n test-env --file environment-dev.yml | ||
- name: Install as package | ||
run: | | ||
pip -v install --no-deps --editable . | ||
- name: Run tests with coverage | ||
run: | | ||
coverage run -m pytest -xs | ||
- name: Generate coverage report | ||
if: matrix.os == 'ubuntu' | ||
run: | | ||
coverage report --format markdown > coverage.md | ||
- name: Extract coverage percentage | ||
if: matrix.os == 'ubuntu' | ||
run: | | ||
export COV_PERCENT=$(coverage report --format total) | ||
echo "COV_PERCENT=$COV_PERCENT" >> $GITHUB_ENV | ||
- name: Create Coverage Badge | ||
if: matrix.os == 'ubuntu' | ||
uses: schneegans/dynamic-badges-action@v1.7.0 | ||
with: | ||
auth: ${{ secrets.GIST_SECRET }} | ||
gistID: 056fdf29a6c0ab5b61a62f21468be178 | ||
filename: molecule-signature-coverage.json | ||
label: coverage | ||
message: ${{ env.COV_PERCENT }}% | ||
valColorRange: ${{ env.COV_PERCENT }} | ||
minColorRange: 50 | ||
maxColorRange: 90 | ||
|
||
- name: Upload coverage report | ||
if: matrix.os == 'ubuntu' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: coverage | ||
path: coverage.md | ||
compression-level: 0 |