Skip to content

Commit

Permalink
Run tests in isolation from linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bmario committed Dec 21, 2021
1 parent cf88d97 commit 2c13f09
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@ name: Python package
on: [push, pull_request]

jobs:
build:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
couchdb: ["2.3", "3.0", "3.1"]
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]

steps:
- name: Setup CouchDB
uses: iamssen/couchdb-github-action@0.3.0
with:
couchdb-version: ${{ matrix.couchdb }}
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
Expand All @@ -23,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[tests,dev]'
pip install '.[dev]'
- name: Lint with flake8
run: |
pip install flake8
Expand All @@ -37,6 +32,28 @@ jobs:
run: black --check .
- name: Run mypy
run: mypy --strict aiocouch tests examples

test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, "3.10"]
couchdb: ["2.3", "3.0", "3.1"]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Setup CouchDB
uses: iamssen/couchdb-github-action@0.3.0
with:
couchdb-version: ${{ matrix.couchdb }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install '.[tests]'
- name: Test with pytest
run: |
python -m pytest --cov-report xml --cov aiocouch
Expand Down Expand Up @@ -67,7 +84,7 @@ jobs:
working-directory: docs

artifacts:
needs: [build, documentation]
needs: [lint, documentation, test]
runs-on: ubuntu-latest

steps:
Expand Down

0 comments on commit 2c13f09

Please sign in to comment.