-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
2 changed files
with
69 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,36 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
jobs: | ||
quality-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "latest" | ||
enable-cache: true | ||
|
||
- name: Sync Deps | ||
run: uv sync | ||
|
||
- name: Lint | ||
run: uv run ruff check | ||
|
||
- name: Format | ||
run: uv run ruff format --check | ||
|
||
- name: Type Check | ||
run: uv run mypy src | ||
|
||
- name: Test | ||
run: uv run pytest | ||
|
||
|
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,33 @@ | ||
# Release a new version of the project to PyPI | ||
# To trigger this workflow manually, run the following command: | ||
# gh workflow run release.yml -f tag=v1.0.0 | ||
# or git tag 1.0.0 && git push origin --tags | ||
|
||
name: Publish Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build-and-publish: | ||
name: Build and publish | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install the latest version of uv | ||
uses: astral-sh/setup-uv@v2 | ||
with: | ||
version: "latest" | ||
enable-cache: true | ||
|
||
- name: Sync Deps | ||
run: uv sync | ||
|
||
- name: Build | ||
run: uv build | ||
|
||
- name: Publish | ||
run: uvx twine upload dist |