Skip to content

[pre-commit.ci] pre-commit autoupdate #79

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #79

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.8", "3.10"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip packages
uses: actions/cache@v2
with:
key: ${{ matrix.python-version }}
path: |
~/.cache/pip
- name: Upgrade pip
shell: bash
run: |
python -m pip install pip --upgrade --disable-pip-version-check
- name: Run linting
run: |
pip install flake8
flake8 --exit-zero
- name: Run tests with required packages
run: |
pip install -e .[test]
pytest -v
- name: Run tests with optional packages
run: |
pip install -e .[optional]
pytest -n2 -v --cov
- name: Run doctest
run: |
pytest -v gridit --doctest-modules
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3