-
Notifications
You must be signed in to change notification settings - Fork 77
48 lines (41 loc) · 1.24 KB
/
test.yaml
File metadata and controls
48 lines (41 loc) · 1.24 KB
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
name: Test spread
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
run-tests:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Run unit tests
run: |
sudo snap install go --classic
go test -v ./...
- name: Build local spread
run: |
mkdir spread-testing
cd spread-testing
git init
git remote add origin https://github.com/canonical/spread.git
# Pin spread to a known stable commit; update only after verification.
git fetch --depth=1 origin ae284792596e00d325a1787604fe4ec7e00574aa
git checkout FETCH_HEAD
go build -o spread-testing ./cmd/spread
sudo install -m755 spread-testing /usr/bin/spread
cd ..
rm -Rf spread-testing
- name: Run spread tests
run: |
uname -a
SPREAD_GOOGLE_KEY=$(echo "${{ secrets.SPREAD_GOOGLE_KEY }}" | base64 -d) /usr/bin/spread google:
- name: Discard spread workers
if: always()
run: |
shopt -s nullglob
for r in .spread-reuse.*.yaml; do
spread -discard -reuse-pid="$(echo "$r" | grep -o -E '[0-9]+')"
done