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'
|
name: '🔎 Python Linter'
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- 'master'
|
|
||||||
paths:
|
|
||||||
- 'scripts/libraries/*.py'
|
|
||||||
|
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
@ -18,11 +12,11 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- 'master'
|
- 'master'
|
||||||
paths:
|
paths:
|
||||||
|
- 'scripts/examples/*.py'
|
||||||
- 'scripts/libraries/*.py'
|
- 'scripts/libraries/*.py'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -36,13 +30,14 @@ jobs:
|
|||||||
- name: '🐍 Set up Python ${{ matrix.python-version }}'
|
- name: '🐍 Set up Python ${{ matrix.python-version }}'
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
|
cache: 'pip'
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: '🛠 Install dependencies'
|
- name: '🛠 Install dependencies'
|
||||||
run: |
|
run: |
|
||||||
python -m pip install --upgrade pip
|
pip install -r requirements.txt
|
||||||
python -m pip install flake8 pytest
|
flake8 --version
|
||||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
pytest --version
|
||||||
|
|
||||||
- name: '😾 Lint with flake8'
|
- name: '😾 Lint with flake8'
|
||||||
run: |
|
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