2424 - name : Set up environment
2525 run : |
2626 sudo snap install charmcraft --classic
27+ sudo snap install go --classic
28+ go install github.com/snapcore/spread/cmd/spread@latest
2729 pipx install tox poetry
2830 - name : Collect spread jobs
2931 id : collect-jobs
@@ -32,11 +34,15 @@ jobs:
3234 run : |
3335 import json
3436 import os
37+ import pathlib
3538 import subprocess
3639
3740 spread_jobs = (
3841 subprocess.run(
39- ["charmcraft", "test", "--list", "github-ci"], capture_output=True, check=True, text=True
42+ [pathlib.Path.home() / "go/bin/spread", "-list", "github-ci"],
43+ capture_output=True,
44+ check=True,
45+ text=True,
4046 )
4147 .stdout.strip()
4248 .split("\n")
@@ -106,10 +112,8 @@ jobs:
106112 uses : actions/checkout@v5
107113 - name : Set up environment
108114 timeout-minutes : 5
109- run : sudo snap install charmcraft --classic
110- # TODO: remove when https://github.com/canonical/charmcraft/issues/2105 and
111- # https://github.com/canonical/charmcraft/issues/2130 fixed
112- - run : |
115+ run : |
116+ sudo snap install charmcraft --classic
113117 sudo snap install go --classic
114118 go install github.com/snapcore/spread/cmd/spread@latest
115119 - name : Download packed charm(s)
@@ -122,9 +126,6 @@ jobs:
122126 timeout-minutes : 180
123127 id : spread
124128 working-directory : ${{ inputs.path-to-charm-directory }}
125- # TODO: replace with `charmcraft test` when
126- # https://github.com/canonical/charmcraft/issues/2105 and
127- # https://github.com/canonical/charmcraft/issues/2130 fixed
128129 run : ~/go/bin/spread -vv -artifacts=artifacts '${{ matrix.job.spread_job }}'
129130 env :
130131 UBUNTU_PRO_TOKEN : ${{ secrets.UBUNTU_PRO_TOKEN }}
0 commit comments