mirror of
https://github.com/openmv/openmv.git
synced 2025-09-26 23:09:13 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v5...v6) --- updated-dependencies: - dependency-name: actions/setup-python dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
|
|
|
|
name: '🔎 Python Linter'
|
|
|
|
on:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
branches:
|
|
- 'master'
|
|
paths:
|
|
- 'scripts/examples/**.py'
|
|
- 'scripts/libraries/**.py'
|
|
|
|
jobs:
|
|
formatting-check:
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10"]
|
|
|
|
steps:
|
|
- name: '⏳ Checkout repository'
|
|
uses: actions/checkout@v5
|
|
|
|
- name: '🐍 Set up Python ${{ matrix.python-version }}'
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
cache: 'pip'
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: '🛠 Install dependencies'
|
|
run: |
|
|
pip install -r .github/workflows/requirements.txt
|
|
flake8 --version
|
|
pytest --version
|
|
|
|
- name: '😾 Lint with flake8'
|
|
run: |
|
|
# stop the build if there are Python syntax errors or undefined names
|
|
flake8 --count --select=E9,F63,F7,F82 --ignore=F821 --show-source --statistics scripts/libraries/ scripts/examples/
|
|
flake8 --count --max-complexity=15 --max-line-length=120 --ignore=F821,E722,E741,C901,E713,W605,E203,W503,F841,F403,F405 --statistics scripts/libraries/ scripts/examples/
|