From f06fe894d2fbf3399fb606894a0ce10ffacd2d39 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 4 Jul 2024 15:49:00 -0400 Subject: [PATCH 1/3] github: use canonical/setup-lxd action to setup LXD Fixes #586, probably due to `sudo -g lxd` not preserving the `$PATH` in which the actions/setup-python had put the python executable. Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a454859a..76837207 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,18 +49,12 @@ jobs: with: python-version: ${{ matrix.python-version }} + - name: Setup LXD + uses: canonical/setup-lxd@main + - name: Install dependencies run: | set -x - - sudo apt-get autopurge moby-containerd docker uidmap -y - sudo ip link delete docker0 - sudo nft flush ruleset - - sudo snap refresh lxd - sudo adduser "$USER" lxd - sudo lxd init --auto - pip install --upgrade pip tox codecov - name: Coverage @@ -70,7 +64,7 @@ jobs: - name: Integration run: | - sudo -g lxd integration/run-integration-tests + integration/run-integration-tests publish: name: Publish From 454b5bbf926aa92cecc310a8d690c6d8796e97b9 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 4 Jul 2024 16:02:39 -0400 Subject: [PATCH 2/3] github: test multiple LXD snap channels Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 76837207..52cdb03c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -38,6 +38,7 @@ jobs: strategy: matrix: python-version: ["3.8", "3.10", "3.11", "3.12"] + track: ["latest/edge", "5.21/edge", "5.0/edge"] runs-on: ubuntu-22.04 steps: @@ -51,6 +52,8 @@ jobs: - name: Setup LXD uses: canonical/setup-lxd@main + with: + channel: ${{ matrix.track }} - name: Install dependencies run: | From d95696e34eb385836eec367009fb5cd53c2b1726 Mon Sep 17 00:00:00 2001 From: Simon Deziel Date: Thu, 4 Jul 2024 16:08:39 -0400 Subject: [PATCH 3/3] github: switch to 24.04 Signed-off-by: Simon Deziel --- .github/workflows/tests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 52cdb03c..6568e6f0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -39,8 +39,9 @@ jobs: matrix: python-version: ["3.8", "3.10", "3.11", "3.12"] track: ["latest/edge", "5.21/edge", "5.0/edge"] + os: ["24.04"] - runs-on: ubuntu-22.04 + runs-on: ubuntu-${{ matrix.os }} steps: - name: Repository checkout uses: actions/checkout@v4