-
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.
Update Python workflows to use uv (#105)
Creates new Python workflows to use `uv` instead of `poetry`. Signed-off-by: Rémy Greinhofer <[email protected]>
- Loading branch information
Showing
3 changed files
with
103 additions
and
3 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,40 @@ | ||
name: ci | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 | ||
- uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 | ||
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 | ||
with: | ||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install | ||
- name: Setup the project | ||
run: uv sync --all-extras --dev | ||
- name: Lint markdown files | ||
run: just lint-md | ||
- name: Lint Python files | ||
run: just lint-python | ||
- name: Lint the docs | ||
run: just docs | ||
|
||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 | ||
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 | ||
with: | ||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install | ||
- name: Setup the project | ||
run: uv sync --all-extras --dev | ||
- name: Run the unit tests | ||
run: just test |
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
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,60 @@ | ||
name: release | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: extractions/setup-just@dd310ad5a97d8e7b41793f8ef055398d51ad4de6 # v2.0.0 | ||
- uses: ts-graphviz/setup-graphviz@b1de5da23ed0a6d14e0aeee8ed52fdd87af2363c # v2.0.2 | ||
- uses: astral-sh/setup-uv@887a942a15af3a7626099df99e897a18d9e5ab3a #v5.1.0 | ||
with: | ||
enable-cache: true | ||
- name: Set up Python | ||
run: uv python install | ||
- name: Setup the project | ||
run: uv sync --all-extras --dev | ||
- name: Lint markdown files | ||
run: just lint-md | ||
- name: Lint Python files | ||
run: just lint-python | ||
- name: Build the docs | ||
run: just docs | ||
- name: Upload documentation for release | ||
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0 | ||
with: | ||
name: docs | ||
path: docs/build/html/ | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- build | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | ||
with: | ||
name: docs | ||
path: docs/build/html | ||
- name: Deploy | ||
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: docs/build/html/ | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: | ||
- docs | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/changelog-reader-action@32aa5b4c155d76c94e4ec883a223c947b2f02656 # v2.2.3 | ||
- name: Publish the release | ||
uses: softprops/action-gh-release@7b4da11513bf3f43f9999e90eabced41ab8bb048 # v2.2.0 | ||
with: | ||
body: ${{ steps.changelog_reader.outputs.changes }} |