Move flake8 test in new Lint GH Workflow thus before Provider tests (#1000)

* Move flake before provider tests

* Move flake8 to separate job

* Corrected run logic
This commit is contained in:
KoalaGeo
2022-09-28 11:51:10 +01:00
committed by GitHub
parent 197b5588cb
commit d6b87e8536
2 changed files with 40 additions and 11 deletions
+36
View File
@@ -0,0 +1,36 @@
name: Lint
on:
push:
paths:
- '*.py'
- '!**.md'
pull_request:
branches:
- master
paths:
- '*.py'
- '!**.md'
release:
types:
- released
jobs:
flake8_py3:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: 3.7.4
architecture: x64
- name: Checkout PyTorch
uses: actions/checkout@master
- name: Install flake8
run: pip install flake8
- name: Run flake8
uses: suo/flake8-github-action@releases/v1
with:
checkName: 'flake8_py3' # NOTE: this needs to be the same as the job name
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+4 -11
View File
@@ -1,19 +1,14 @@
name: Build
on:
push:
workflow_run:
workflows: ["Lint"]
types: [completed]
branches:
- master
paths-ignore:
- '**.md'
pull_request:
branches:
- master
paths-ignore:
- '**.md'
release:
types:
- released
jobs:
main:
@@ -105,8 +100,6 @@ jobs:
pytest tests/test_util.py
pytest tests/test_xarray_netcdf_provider.py
pytest tests/test_xarray_zarr_provider.py
- name: run flake8 ⚙️
run: find . -type f -name "*.py" | xargs flake8
- name: build docs 🏗️
run: cd docs && make html
- name: failed tests 🚩