-
Notifications
You must be signed in to change notification settings - Fork 2
49 lines (40 loc) · 1.11 KB
/
build-and-test-snap.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Snap Build and Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allow manual trigger
workflow_dispatch:
jobs:
build-and-test-arm64:
runs-on: Ubuntu_ARM64_4C_16G_01
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Build Snap
uses: snapcore/action-build@v1
id: snapcraft
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.*'
cache: false
- name: Run tests
working-directory: tests
env:
MOCK_GPIO: true
SKIP_TEARDOWN_REMOVAL: true
LOCAL_SERVICE_SNAP: ../${{ steps.snapcraft.outputs.snap }}
run: go test -failfast -p 1 -timeout 20m -v
- name: Upload snap logs
if: always()
uses: actions/upload-artifact@v4
with:
name: snap-logs
path: tests/*.log
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: matter-pi-gpio-commander_${{ github.run_number}}_arm64.snap
path: ${{ steps.snapcraft.outputs.snap }}