Skip to content

Commit aae5c85

Browse files
Update GH Actions
1 parent 08b8327 commit aae5c85

File tree

6 files changed

+100
-65
lines changed

6 files changed

+100
-65
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,56 @@ name: CI
33
on: [push]
44

55
jobs:
6-
lint:
7-
6+
static-checks:
87
runs-on: ubuntu-latest
9-
name: lint
8+
strategy: &python-matrix
9+
matrix:
10+
python-version:
11+
- "3.10"
12+
- "3.11"
13+
- "3.12"
14+
name: static-checks
1015
steps:
11-
- uses: actions/checkout@v4
12-
- name: Set up Python 3.10
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
19+
- name: Set up Python
1320
uses: actions/setup-python@v5
1421
with:
15-
python-version: '3.10'
16-
- name: Install poetry
17-
run: pip install poetry
22+
python-version: ${{ matrix.python-version }}
23+
24+
- name: Install uv
25+
uses: astral-sh/setup-uv@v6
26+
with:
27+
python-version: ${{ matrix.python-version }}
28+
enable-cache: true
29+
1830
- name: Install project dependencies
19-
run: poetry install --no-ansi --with=dev
31+
run: uv sync --locked --all-extras --dev
32+
33+
- name: Format
34+
run: uv run format_check
35+
2036
- name: Lint
21-
run: poetry run lint
22-
- name: Check format
23-
run: poetry run format_check
24-
- name: Type checker
25-
run: poetry run pyright
26-
37+
run: uv run lint
38+
39+
- name: Type check
40+
run: uv run pyright
41+
2742
test:
28-
runs-on: ubuntu-latest
29-
strategy:
30-
matrix:
31-
python-version: ["3.10", "3.11", "3.12"]
32-
env:
33-
PYTHON_VERSION: ${{ matrix.python-version }}
34-
name: test
35-
steps:
36-
- uses: actions/checkout@v4
37-
38-
- name: Log in to GitHub Container Registry
39-
run: echo "${{ secrets.PACKAGE_ACCESS_TOKEN }}" | docker login ghcr.io -u USERNAME --password-stdin
40-
41-
- name: Run tests
42-
run: docker compose -f docker-compose-test.yaml up test --exit-code-from test
43-
44-
- name: Tear down test containers
45-
run: docker compose -f docker-compose-test.yaml down
43+
runs-on: ubuntu-latest
44+
strategy: *python-matrix
45+
env:
46+
PYTHON_VERSION: ${{ matrix.python-version }}
47+
name: test
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- name: Log in to GitHub Container Registry
52+
run: echo "${{ secrets.PACKAGE_ACCESS_TOKEN }}" | docker login ghcr.io -u USERNAME --password-stdin
53+
54+
- name: Run tests
55+
run: docker compose -f docker-compose-test.yaml up test --exit-code-from test
56+
57+
- name: Tear down test containers
58+
run: docker compose -f docker-compose-test.yaml down

.github/workflows/main_docs.yml

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,33 +8,39 @@ on:
88
workflow_dispatch:
99
inputs:
1010
code_branch_tag:
11-
description: 'The branch or tag to run the workflow from'
11+
description: "The branch or tag to run the workflow from"
1212
required: true
13-
default: 'main'
13+
default: "main"
1414

1515
jobs:
1616
# Build the documentation and upload the static HTML files as an artifact.
1717
build:
1818
runs-on: ubuntu-latest
1919
steps:
20-
- uses: actions/checkout@v3
20+
- uses: actions/checkout@v4
2121
with:
2222
ref: ${{ github.event.inputs.ref }}
23-
- uses: actions/setup-python@v4
23+
24+
- uses: actions/setup-python@v5
25+
with:
26+
python-version-file: "pyproject.toml"
27+
28+
- uses: astral-sh/setup-uv@v6
2429
with:
25-
python-version: '3.12'
26-
- uses: abatilo/actions-poetry@v2
27-
- run: poetry install
28-
- run: poetry run generate_docs
30+
python-version-file: "pyproject.toml"
31+
enable-cache: true
32+
33+
- run: uv install
34+
- run: uv run generate_docs
2935
- run: git fetch origin gh-pages --depth=1
3036
- run: git config user.name ci-bot
3137
- run: git config user.email [email protected]
32-
- run: poetry run mike deploy latest
38+
- run: uv run mike deploy latest
3339
- run: git checkout gh-pages
34-
40+
3541
# Push changes to gh-pages branch
3642
- name: Push changes
3743
uses: ad-m/github-push-action@master
3844
with:
39-
github_token: ${{ secrets.GITHUB_TOKEN }}
40-
branch: gh-pages
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
branch: gh-pages

.github/workflows/publish.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,20 @@ on:
55
tags:
66
- "v*.*.*"
77
jobs:
8-
build:
8+
publish:
99
runs-on: ubuntu-latest
10+
name: Publish to PyPI
1011
steps:
11-
- uses: actions/checkout@v3
12-
- name: Build and publish to pypi
13-
uses: JRubics/[email protected]
14-
with:
15-
pypi_token: ${{ secrets.PYPI_TOKEN }}
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Install uv
16+
uses: astral-sh/setup-uv@v6
17+
18+
- name: Build package
19+
run: uv build
20+
21+
- name: Publish package
22+
env:
23+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_TOKEN }}
24+
run: uv publish

.github/workflows/tag_docs.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,23 +10,29 @@ jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-python@v4
13+
- uses: actions/checkout@v4
14+
15+
- uses: actions/setup-python@v5
16+
with:
17+
python-version-file: "pyproject.toml"
18+
19+
- uses: astral-sh/setup-uv@v6
1520
with:
16-
python-version: '3.9'
17-
- uses: abatilo/actions-poetry@v2
18-
- run: poetry install
19-
- run: poetry run generate_docs
21+
python-version-file: "pyproject.toml"
22+
enable-cache: true
23+
24+
- run: uv install
25+
- run: uv run generate_docs
2026
- run: git fetch origin gh-pages --depth=1
2127
- run: git config user.name ci-bot
2228
- run: git config user.email [email protected]
23-
- run: poetry run mike deploy ${{github.ref_name}}
24-
- run: poetry run mike set-default ${{github.ref_name}}
29+
- run: uv run mike deploy ${{ github.ref_name }}
30+
- run: uv run mike set-default ${{ github.ref_name }}
2531
- run: git checkout gh-pages
26-
32+
2733
# Push changes to gh-pages branch
2834
- name: Push changes
2935
uses: ad-m/github-push-action@master
3036
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
branch: gh-pages
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
branch: gh-pages

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
python 3.13.5
2-
poetry 2.1.3
2+
uv 0.8.12

examples/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# Fishjam Room Manager
22

33
## Running (in dev mode)
4+
45
All available options are defined in [arguments.py](room_manager/arguments.py).
56

67
```console
7-
poetry install
8-
poetry run room_manager # Room Manager has to be started in the project root directory
8+
uv sync
9+
uv run room_manager # Room Manager has to be started in the project root directory
910
```
1011

1112
## How does it work?

0 commit comments

Comments
 (0)