Skip to content

Commit

Permalink
Migrate nosetests to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Aug 26, 2021
1 parent a822ee0 commit 782fab9
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 31 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,44 @@ jobs:
. venv/bin/activate
python -m pip install -U pip setuptools wheel coveralls coverage pre-commit pytest-cov pytest-benchmark
pytest --benchmark-disable --cov --cov-report= tests/
nosetests-linux:
name: Run nosetests Python ${{ matrix.python-version }} (Linux)
runs-on: ubuntu-latest
needs: prepare-tests-linux
strategy:
fail-fast: false
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev]
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2.3.4
- name: Set up Python ${{ matrix.python-version }}
id: python
uses: actions/setup-python@v2.2.2
with:
python-version: ${{ matrix.python-version }}
- name: Restore Python virtual environment
id: cache-venv
uses: actions/cache@v2.1.6
with:
path: venv
key:
${{ runner.os }}-${{ steps.python.outputs.python-version }}-${{
needs.prepare-tests-linux.outputs.python-key }}
- name: Fail job if Python cache restore failed
if: steps.cache-venv.outputs.cache-hit != 'true'
run: |
echo "Failed to restore Python venv from cache"
exit 1
- name: Run pytest
run: |
. venv/bin/activate
- "pip install safety pipenv numpy tzlocal nose coverage coveralls -U"
- "pip freeze | safety check --stdin"
- "nosetests -s --with-coverage --cover-inclusive --cover-package=prospector tests/"
- "mv .coverage .coverage.x"
- "coverage run --parallel-mode prospector/run.py || true"
- "coverage combine"
- "coverage report --show-missing"
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

0 comments on commit 782fab9

Please sign in to comment.