[workflow] bump
This commit is contained in:
parent
c9bef35303
commit
8fe597ce70
1 changed files with 36 additions and 28 deletions
64
.github/workflows/python.yml
vendored
64
.github/workflows/python.yml
vendored
|
|
@ -1,36 +1,44 @@
|
||||||
name: Python lint and test
|
name: Python Quality & Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches: [main, 'releases/**']
|
||||||
- main
|
paths: ['**.py']
|
||||||
- 'releases/**'
|
|
||||||
paths:
|
|
||||||
- '**.py'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches: [main, 'releases/**']
|
||||||
- main
|
paths: ['**.py']
|
||||||
- 'releases/**'
|
|
||||||
paths:
|
# Automatically cancel older runs of the same PR/branch if a new commit is pushed
|
||||||
- '**.py'
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
linttest:
|
quality:
|
||||||
runs-on: ubuntu-22.04
|
name: Lint, Typecheck, and Test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- name: Checkout Code
|
||||||
- uses: actions/setup-python@v5
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install uv (Fastest Python Tooling)
|
||||||
|
uses: astral-sh/setup-uv@v3
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
enable-cache: true
|
||||||
- name: Install dependencies
|
|
||||||
run: |
|
- name: Set up Python
|
||||||
python -m pip install --upgrade pip
|
run: uv python install 3.14
|
||||||
pip install -r requirements_local.txt
|
|
||||||
- name: Run black
|
- name: Install Dependencies
|
||||||
run: black --check fooder
|
run: uv pip install -r requirements/local.txt
|
||||||
- name: Run flake8
|
|
||||||
run: flake8 fooder
|
- name: Lint and Format (Ruff)
|
||||||
- name: Run mypy
|
# Replaces Black and Flake8 in one go
|
||||||
run: mypy fooder
|
run: uv run ruff check fooder && uv run ruff format --check fooder
|
||||||
- name: Run tests
|
|
||||||
run: ./test.sh
|
- name: Type Check (Mypy)
|
||||||
|
run: uv run mypy fooder
|
||||||
|
|
||||||
|
- name: Run Tests
|
||||||
|
run: chmod +x ./test.sh && ./test.sh
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue