Initial template #4
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: 0.7 | |
- name: Install dependencies | |
run: uv sync | |
- name: Lint check | |
run: uv run ruff check | |
- name: Lint fix check | |
run: | | |
uv run ruff check --fix | |
git diff --exit-code | |
- name: Formatting check | |
run: uv run ruff format --check | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.11 | |
- name: Install uv | |
uses: astral-sh/setup-uv@v5 | |
with: | |
version: 0.7 | |
- name: Install dependencies | |
run: uv sync | |
- name: Run tests | |
run: PYTHON_ENV=test uv run pytest |