-
Notifications
You must be signed in to change notification settings - Fork 82
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
139 additions
and
51 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,65 @@ | ||
name: Python package | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Set up Python | ||
run: uv python install | ||
|
||
- name: Install the project | ||
run: uv sync --all-extras --dev | ||
|
||
# - name: Run tests | ||
# run: uv run pytest tests --junit-xml=test-results.xml | ||
|
||
# - name: Upload test results | ||
# uses: actions/upload-artifact@v4 | ||
# with: | ||
# name: pytest-results | ||
# path: test-results.xml | ||
|
||
- name: Run Ruff | ||
run: uv run ruff check . --output-file ruff-results.xml --output-format junit | ||
|
||
- name: Upload ruff results | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ruff-results | ||
path: ruff-results.xml | ||
|
||
build: | ||
|
||
name: build distribution | ||
runs-on: ubuntu-latest | ||
|
||
needs: | ||
- test | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: git fetch --tags | ||
|
||
- name: Install uv | ||
uses: astral-sh/setup-uv@v3 | ||
|
||
- name: Build dist | ||
run: uv build | ||
|
||
- name: built artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ |
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