Skip to content

Commit

Permalink
update test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyburnett committed Feb 2, 2022
1 parent e7dac5a commit a0cc124
Showing 1 changed file with 7 additions and 14 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
python-version: [ 3.8, 3.9 ]
python-version: [ 3.8, '3.x' ]
steps:
- name: Checkout repository
uses: actions/checkout@v2
Expand All @@ -24,27 +24,20 @@ jobs:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
restore-keys: ${{ runner.os }}-pip-${{ matrix.python-version }}-
- name: Install wheel
run: pip install wheel
- name: Run setup.py on Windows
if: contains(matrix.os, 'windows')
run: python setup.py install
- name: Install dependencies
run: |
pip install wheel
pip install flake8
pip install -e .[testing]
run: pip install ".[testing,development]"
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Run tests with coverage
run: pytest --cov=coupledmodeldriver --numprocesses auto
run: pytest --numprocesses auto --cov ./
- name: Upload coverage to Codecov
if: matrix.python-version == 3.9
uses: codecov/codecov-action@v1
if: matrix.python-version == '3.x'
uses: codecov/codecov-action@v2.1.0
with:
flags: python${{ matrix.python-version }}-${{ runner.os }}
token: ${{ secrets.CODECOV_TOKEN }}
files: .coverage
fail_ci_if_error: true

0 comments on commit a0cc124

Please sign in to comment.