mirror of
https://github.com/Paillat-dev/dismoji.git
synced 2026-01-02 00:56:19 +00:00
94 lines
2.3 KiB
YAML
94 lines
2.3 KiB
YAML
name: Quality Checks
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
check-license-header:
|
|
name: License Header Check
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
- name: Setup Copywrite
|
|
uses: hashicorp/setup-copywrite@32638da2d4e81d56a0764aa1547882fc4d209636 # v1.1.3
|
|
- name: Check Header Compliance
|
|
run: copywrite headers --plan --config .copywrite.hcl
|
|
|
|
tests:
|
|
name: Tests
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
|
|
include:
|
|
- python-version: "3.10"
|
|
name: "Python 3.10"
|
|
- python-version: "3.11"
|
|
name: "Python 3.11"
|
|
- python-version: "3.12"
|
|
name: "Python 3.12"
|
|
- python-version: "3.13"
|
|
name: "Python 3.13"
|
|
- python-version: "3.14"
|
|
name: "Python 3.14"
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v5
|
|
with:
|
|
submodules: true
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: "Install uv"
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Install dependencies
|
|
run: uv sync --no-managed-python --no-python-downloads
|
|
|
|
- name: Run tests
|
|
run: uv run pytest ./tests
|
|
|
|
quality:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
check: [format, lint, basedpyright]
|
|
include:
|
|
- check: format
|
|
name: "Format Check"
|
|
command: "uv run ruff format --check ."
|
|
- check: lint
|
|
name: "Lint Check"
|
|
command: "uv run ruff check ."
|
|
- check: basedpyright
|
|
name: "Type Check"
|
|
command: "uv run basedpyright ."
|
|
|
|
name: ${{ matrix.name }}
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
|
|
- name: "Install uv"
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: "Set up Python"
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version-file: "pyproject.toml"
|
|
|
|
- name: Install dependencies
|
|
run: uv sync
|
|
|
|
- name: ${{ matrix.name }}
|
|
run: ${{ matrix.command }} |