[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:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 'releases/**'
|
||||
paths:
|
||||
- '**.py'
|
||||
branches: [main, 'releases/**']
|
||||
paths: ['**.py']
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
- 'releases/**'
|
||||
paths:
|
||||
- '**.py'
|
||||
branches: [main, 'releases/**']
|
||||
paths: ['**.py']
|
||||
|
||||
# Automatically cancel older runs of the same PR/branch if a new commit is pushed
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
linttest:
|
||||
runs-on: ubuntu-22.04
|
||||
quality:
|
||||
name: Lint, Typecheck, and Test
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-python@v5
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install uv (Fastest Python Tooling)
|
||||
uses: astral-sh/setup-uv@v3
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install -r requirements_local.txt
|
||||
- name: Run black
|
||||
run: black --check fooder
|
||||
- name: Run flake8
|
||||
run: flake8 fooder
|
||||
- name: Run mypy
|
||||
run: mypy fooder
|
||||
- name: Run tests
|
||||
run: ./test.sh
|
||||
enable-cache: true
|
||||
|
||||
- name: Set up Python
|
||||
run: uv python install 3.14
|
||||
|
||||
- name: Install Dependencies
|
||||
run: uv pip install -r requirements/local.txt
|
||||
|
||||
- name: Lint and Format (Ruff)
|
||||
# Replaces Black and Flake8 in one go
|
||||
run: uv run ruff check fooder && uv run ruff format --check fooder
|
||||
|
||||
- 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