Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/workshop-tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Workshop tests
on:
push:
branches:
- "main"
- "feature/*"
- "hotfix/*"
- "release/*"
- "renovate/*"
pull_request:

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-26.04
- ubuntu-26.04-arm
workshop:
- py38
- py39
- py310
- py311
- py312
- py313
- py314
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Launch workshop
uses: canonical/launch-workshop@v1
with:
workshop: ${{ matrix.workshop }}
cache: |
uv:cache

- name: Run tests
run: workshop run "$WS" test
env:
WS: ${{ matrix.workshop }}
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -143,3 +143,7 @@ dmypy.json

# Visual Studio Code
.vscode/

# Workshop local state
.workshop.lock
!/.workshop/venv/
2 changes: 2 additions & 0 deletions .workshop/craft/hooks/setup-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apt-get update
apt-get install make
Comment thread
lengau marked this conversation as resolved.
4 changes: 4 additions & 0 deletions .workshop/craft/hooks/setup-project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
uv tool install -U ruff
uv tool install -U ty

make setup
3 changes: 3 additions & 0 deletions .workshop/craft/sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: craft
plugs: {}
slots: {}
18 changes: 18 additions & 0 deletions .workshop/dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: dev
base: ubuntu@26.04
sdks:
- name: uv
- name: copilot
- name: project-craft

actions:
format: make format
lint: make lint
test: make test
test-fast: make test-fast
test-slow: make test-slow
test-find-slow: make test-find-slow
docs: make docs
pack: make pack
clean: make clean
copilot: copilot
8 changes: 8 additions & 0 deletions .workshop/py310.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: py310
base: ubuntu@22.04
sdks:
- name: uv
- name: project-venv
Comment thread
lengau marked this conversation as resolved.

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.10 uv run --python 3.10 --group dev pytest "$@"
7 changes: 7 additions & 0 deletions .workshop/py311.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: py311
base: ubuntu@22.04
sdks:
- name: uv

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.11 uv run --python 3.11 --group dev pytest "$@"
8 changes: 8 additions & 0 deletions .workshop/py312.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: py312
base: ubuntu@24.04
sdks:
- name: uv
- name: project-venv
Comment thread
lengau marked this conversation as resolved.

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.12 uv run --python 3.12 --group dev pytest "$@"
7 changes: 7 additions & 0 deletions .workshop/py313.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: py313
base: ubuntu@24.04
sdks:
- name: uv

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.13 uv run --python 3.13 --group dev pytest "$@"
8 changes: 8 additions & 0 deletions .workshop/py314.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
name: py314
base: ubuntu@26.04
sdks:
- name: uv
- name: project-venv
Comment thread
lengau marked this conversation as resolved.

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.14 uv run --python 3.14 --group dev pytest "$@"
7 changes: 7 additions & 0 deletions .workshop/py38.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: py38
base: ubuntu@22.04
sdks:
- name: uv

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.8 uv run --python 3.8 --group dev pytest "$@"
7 changes: 7 additions & 0 deletions .workshop/py39.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
name: py39
base: ubuntu@22.04
sdks:
- name: uv

actions:
test: UV_PROJECT_ENVIRONMENT=/project/.venv-py3.9 uv run --python 3.9 --group dev pytest "$@"
2 changes: 2 additions & 0 deletions .workshop/venv/hooks/setup-base
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
apt-get update
apt-get install -y python3-venv
3 changes: 3 additions & 0 deletions .workshop/venv/sdk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: venv
plugs: {}
slots: {}