Skip to content

Commit

Permalink
Unified the linting jobs to one and added pip caching
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Sep 5, 2020
1 parent 79a7183 commit ca12d02
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions .github/workflows/codeqa-test.yml
Expand Up @@ -3,34 +3,33 @@ name: Python codeqa/test
on:
push:
branches:
- master
- "*"
pull_request:

jobs:
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check code style with Flake8
uses: TrueBrain/actions-flake8@master
with:
path: src tests

mypy:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.x
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-lint
- name: Install dependencies
run: pip install mypy
run: pip install flake8 isort mypy
- name: Run flake8
run: flake8 src tests
- name: Check types with Mypy
run: mypy src
- name: Run isort
run: isort -c src tests

test:
needs: [flake8, mypy]
needs: [lint]
strategy:
fail-fast: false
matrix:
Expand All @@ -52,6 +51,10 @@ jobs:
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v2
with:
path: ~/.cache/pip
key: pip-test-${{ matrix.python-version }}-${{ matrix.os }}
- name: Install dependencies
run: pip install .[test,curio,trio] coveralls
- name: Test with pytest
Expand Down

0 comments on commit ca12d02

Please sign in to comment.