Skip to content
Merged
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
23 changes: 13 additions & 10 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ jobs:
os: ["ubuntu-24.04", "ubuntu-22.04"]
runs-on: ${{ matrix.os }}
steps:
# Access to the snapd socket requires root privileges, so these
# tests need to be run as root.
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: install python dependencies
run: |
sudo apt update
sudo apt install -y python3-pip
sudo pip install poetry==1.7
sudo poetry install
sudo apt-get update

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry==2.3.1
poetry config virtualenvs.in-project true # so sudo can find the venv
poetry install
- name: snapd setup
run: |
sudo apt install -y snapd
sudo apt-get install -y snapd
sudo systemctl start snapd.service
# There is currently a bug where the deb version conflicts with the edge version, causing the deb to be prioritized.
# https://github.com/canonical/prompting-client/pull/283
Expand All @@ -42,8 +43,10 @@ jobs:
run: |
sudo snap install snapcraft --classic
cd tests/integration/test_snap
snapcraft
snapcraft pack
snap download hello-world --basename=hello-world
cd $GITHUB_WORKSPACE
- name: integration test
run: sudo poetry run pytest tests/integration
run: |
# access to the snapd socket requires root privileges
sudo "$(which poetry)" run pytest tests/integration
12 changes: 6 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ jobs:
name: lint and typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: install poetry and dependencies
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry==1.7
pipx install poetry==2.3.1
poetry install
- name: lint
run: poetry run ruff check .
Expand All @@ -27,18 +27,18 @@ jobs:
name: tox unit test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
- name: install poetry and dependencies
run: |
python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install poetry==1.7
pipx install poetry==2.3.1
poetry install
- name: install additional python versions
run: |
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install -y python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
sudo apt install -y python3.8-distutils python3.9-distutils
sudo apt-get install -y python3.8 python3.9 python3.10 python3.11 python3.12 python3.13 python3.14
sudo apt-get install -y python3.8-distutils python3.9-distutils
- name: tox unit test
run: poetry run tox

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
.ONESHELL:
test_snap:
cd tests/integration/test_snap
snapcraft --debug
snapcraft pack --debug
snap download hello-world --basename=hello-world
Loading