Skip to content

Commit 609c9ff

Browse files
authored
Merge pull request #7 from sabaini/workflow-fixes
Workflow: modernize up/download action
2 parents 6674975 + aac3dac commit 609c9ff

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed

.github/workflows/build-and-test.yml

+14-9
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,12 @@ jobs:
4444
needs: modifiedparts
4545
name: Build the charm
4646
runs-on: ubuntu-latest
47-
if: ${{ needs.modifiedparts.output.parts != '[]' }}
47+
if: ${{ needs.modifiedparts.outputs.parts != '[]' }}
4848
strategy:
4949
matrix:
5050
part: ${{ fromJson(needs.modifiedparts.outputs.parts) }}
5151
steps:
52+
5253
- name: Checkout
5354
uses: actions/checkout@v4
5455

@@ -74,26 +75,26 @@ jobs:
7475
tox -c ${{ matrix.part }} -e build
7576
7677
- name: Upload built charm
77-
uses: actions/upload-artifact@v3
78+
uses: actions/upload-artifact@v4
7879
with:
79-
name: charms
80+
name: charm-${{ matrix.part }}
8081
path: "./${{ matrix.part }}/*.charm"
8182

8283
functional-test:
8384
needs:
8485
- modifiedparts
8586
- build
8687
name: Functional tests
87-
runs-on: self-hosted
88+
runs-on: [self-hosted, linux, amd64, X64, large, noble]
8889
if: ${{ needs.modifiedparts.output.parts != '[]' }}
8990
strategy:
9091
matrix:
9192
part: ${{ fromJson(needs.modifiedparts.outputs.parts) }}
9293
steps:
9394
- name: Download charm
94-
uses: actions/download-artifact@v3
95+
uses: actions/download-artifact@v4
9596
with:
96-
name: charms
97+
name: charm-${{ matrix.part }}
9798
path: ~/artifacts/
9899

99100
- name: Checkout code
@@ -114,7 +115,7 @@ jobs:
114115
run: |
115116
sudo apt -y install tox
116117
if [ ! -d "$HOME/.local/share/juju" ]; then
117-
sudo snap install juju --channel=3.4/stable
118+
sudo snap install juju --channel=3.6/stable
118119
mkdir -p ~/.local/share/juju
119120
juju bootstrap localhost localhost
120121
fi
@@ -142,12 +143,16 @@ jobs:
142143
done
143144
144145
- name: Upload artifacts on failure
145-
uses: actions/upload-artifact@v3
146+
uses: actions/upload-artifact@v4
146147
with:
147-
name: crashdumps
148+
name: crashdumps-${{ matrix.part }}
148149
path: "./crashdumps/*"
149150
if: failure()
150151

152+
- name: Setup tmate session
153+
if: ${{ failure() && runner.debug }}
154+
uses: canonical/action-tmate@main
155+
151156
- name: Tear down models
152157
if: always()
153158
run: |

0 commit comments

Comments
 (0)