Skip to content

Commit

Permalink
Split the main GA job into 2 separate linting and testing jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
samkit-jain authored and jsvine committed Aug 15, 2020
1 parent a5e7d7f commit 1aa921b
Showing 1 changed file with 32 additions and 7 deletions.
39 changes: 32 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,37 @@ name: Tests
on: [push]

jobs:
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Configure pip caching
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt')}}-${{ hashFiles('**/requirements-dev.txt') }}

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Validate against psf/black
run: python -m black --check pdfplumber

- name: Validate against flake8
run: python -m flake8 pdfplumber

test:
needs: lint
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -34,13 +64,7 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Validate against psf/black
run: python -m black --check pdfplumber

- name: Validate against flake8
run: python -m flake8 pdfplumber
cat requirements-dev.txt | xargs -n 1 pip install
- name: Run tests
run: |
Expand All @@ -49,3 +73,4 @@ jobs:
- name: Upload code coverage
uses: codecov/[email protected]
if: matrix.python-version == 3.8

0 comments on commit 1aa921b

Please sign in to comment.