Bump actions/checkout from 3 to 4 #563
Workflow file for this run
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
name: Run tests | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.8 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install pre-commit | |
run: | | |
python -m pip install --upgrade pip | |
pip install -U setuptools wheel | |
pip install .[dev] | |
- name: Run pre-commit | |
run: | | |
pre-commit run --all-files || ( git status --short ; git diff ; exit 1 ) | |
pytest: | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
max-parallel: 3 | |
matrix: | |
python-version: ['3.8', '3.9', '3.10'] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: | | |
**/requirements*.txt | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
pip install .[test,dev] | |
- name: Run tests with pytest | |
run: | | |
# run tests with pytest, reporting coverage and timings | |
pytest -m "not slow" -rs -vvv --durations=0 --cov=./modnet/ |