-
Notifications
You must be signed in to change notification settings - Fork 705
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split the main GA job into 2 separate linting and testing jobs
- Loading branch information
1 parent
a5e7d7f
commit 1aa921b
Showing
1 changed file
with
32 additions
and
7 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | | ||
|
@@ -49,3 +73,4 @@ jobs: | |
- name: Upload code coverage | ||
uses: codecov/[email protected] | ||
if: matrix.python-version == 3.8 |