Skip to content

Commit

Permalink
Merge pull request #197 from GSTT-CSC/run-cli-tests-as-job
Browse files Browse the repository at this point in the history
run cli tests as job in dev and production workflows
  • Loading branch information
Lucrezia-Cester authored Feb 22, 2022
2 parents f50e489 + a118516 commit 87dbe39
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 45 deletions.
44 changes: 0 additions & 44 deletions .github/workflows/cli-test.yml

This file was deleted.

32 changes: 31 additions & 1 deletion .github/workflows/tests_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,34 @@ jobs:
label: Test coverage
message: ${{ steps.coverageComment.outputs.coverage }}
color: ${{ steps.coverageComment.outputs.color }}
namedLogo: python
namedLogo: python

test_cli:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.9', '3.10' ]
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install hazen
run: |
python setup.py install
- name: test snr
if: always() # will always run regardless of whether previous step fails - useful to ensure all CLI functions tested
run: |
hazen snr tests/data/snr/Siemens --report
30 changes: 30 additions & 0 deletions .github/workflows/tests_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,33 @@ jobs:
run: |
set -Eeuxo pipefail
pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov=hazenlib tests/ | tee pytest-coverage.txt ; echo $?
test_cli:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ '3.9', '3.10' ]
steps:
- uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest pytest-cov
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Install hazen
run: |
python setup.py install
- name: test snr
if: always() # will always run regardless of whether previous step fails - useful to ensure all CLI functions tested
run: |
hazen snr tests/data/snr/Siemens --report

0 comments on commit 87dbe39

Please sign in to comment.