-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77dbf34
commit be7fcd4
Showing
4 changed files
with
125 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: "Setup Python Environment" | ||
description: "Set up Python environment for the given Python version" | ||
|
||
inputs: | ||
python-version: | ||
description: "Python version to use" | ||
required: true | ||
default: "3.12" | ||
uv-version: | ||
description: "uv version to use" | ||
required: true | ||
default: "0.4.6" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ inputs.python-version }} | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: ${{ inputs.uv-version }} | ||
enable-cache: "true" | ||
cache-suffix: ${{ matrix.python-version }} | ||
|
||
- name: Install Python dependencies | ||
run: uv sync --frozen | ||
shell: bash |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Main | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
types: [opened, synchronize, reopened, ready_for_review] | ||
|
||
jobs: | ||
quality: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
# TODO: Caching | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-python-env | ||
id: setup | ||
|
||
- name: Run `make fmt-check` | ||
run: make fmt-check | ||
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }} | ||
|
||
- name: Run `make check` | ||
run: make check | ||
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }} | ||
|
||
- name: Run `make check-lock` | ||
run: make check-lock | ||
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }} | ||
|
||
- name: Run `make deptry` | ||
run: make deptry | ||
if: ${{ !cancelled() && steps.setup.conclusion == 'success' }} | ||
|
||
tests-and-type-check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] | ||
fail-fast: false | ||
defaults: | ||
run: | ||
shell: bash | ||
steps: | ||
- name: Check out | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up the environment | ||
uses: ./.github/actions/setup-python-env | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Run `make test` | ||
run: make test | ||
|
||
- name: Run `make mypy` | ||
run: make mypy | ||
|
||
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.11 | ||
uses: codecov/codecov-action@v4 | ||
if: ${{ matrix.python-version == '3.11' }} | ||
|
||
# check-docs: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Check out | ||
# uses: actions/checkout@v4 | ||
|
||
# - name: Set up the environment | ||
# uses: ./.github/actions/setup-python-env | ||
|
||
# - name: Check if documentation can be built | ||
# run: uv run mkdocs build -s |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: validate-codecov-config | ||
|
||
on: | ||
pull_request: | ||
paths: [codecov.yaml] | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
validate-codecov-config: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Validate codecov configuration | ||
run: curl -sSL --fail-with-body --data-binary @codecov.yaml https://codecov.io/validate |
This file contains 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