Skip to content

Commit

Permalink
More uv in CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Jan 16, 2025
1 parent d47a5e1 commit 4158241
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@ jobs:
noxenvs: ${{ steps.noxenvs-matrix.outputs.noxenvs }}
steps:
- uses: actions/checkout@v4
- name: Set up nox
uses: wntrblm/[email protected]
- name: Set up uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- id: noxenvs-matrix
run: |
echo >>$GITHUB_OUTPUT noxenvs=$(
nox --list-sessions --json | jq '[.[].session]'
uvx nox --list-sessions --json | jq '[.[].session]'
)
ci:
Expand All @@ -37,7 +39,7 @@ jobs:
noxenv: ${{ fromJson(needs.list.outputs.noxenvs) }}
posargs: [""]
include:
- noxenv: tests-3.12
- noxenv: tests-3.13
posargs: coverage github

steps:
Expand All @@ -63,12 +65,12 @@ jobs:
allow-prereleases: true

- name: Set up uv
uses: hynek/setup-cached-uv@v2
- name: Set up nox
uses: wntrblm/[email protected]
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Run nox
run: nox -s "${{ matrix.noxenv }}" -- ${{ matrix.posargs }}
run: uvx nox -s "${{ matrix.noxenv }}" -- ${{ matrix.posargs }}

packaging:
needs: ci
Expand All @@ -85,17 +87,13 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: "recursive"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Set up uv
uses: hynek/setup-cached-uv@v2
- name: Install dependencies
run: uv pip install --system build
uses: astral-sh/setup-uv@v5
with:
enable-cache: true

- name: Create packages
run: python -m build .
- name: Build our distributions
run: uv run --frozen --with 'build[uv]' -m build --installer=uv

- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
Expand Down

0 comments on commit 4158241

Please sign in to comment.