mirror of
https://github.com/openmv/openmv.git
synced 2025-11-04 14:49:50 +08:00
github: Update Python linter workflow.
This commit is contained in:
parent
ec5b6b534d
commit
6197ca2cc8
15
.github/workflows/python-linter.yml
vendored
15
.github/workflows/python-linter.yml
vendored
@ -4,12 +4,6 @@
|
||||
name: '🔎 Python Linter'
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'scripts/libraries/*.py'
|
||||
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
@ -18,11 +12,11 @@ on:
|
||||
branches:
|
||||
- 'master'
|
||||
paths:
|
||||
- 'scripts/examples/*.py'
|
||||
- 'scripts/libraries/*.py'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@ -36,13 +30,14 @@ jobs:
|
||||
- name: '🐍 Set up Python ${{ matrix.python-version }}'
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
cache: 'pip'
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: '🛠 Install dependencies'
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 pytest
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
pip install -r requirements.txt
|
||||
flake8 --version
|
||||
pytest --version
|
||||
|
||||
- name: '😾 Lint with flake8'
|
||||
run: |
|
||||
|
||||
2
.github/workflows/requirements.txt
vendored
Normal file
2
.github/workflows/requirements.txt
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
flake8
|
||||
pytest
|
||||
Loading…
Reference in New Issue
Block a user