Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,35 @@ on:

jobs:
run-tests:
runs-on: self-hosted
#runs-on: [self-hosted, spread-enabled]
runs-on: [self-hosted]
steps:
- uses: actions/checkout@v4

- name: Run tests
- name: Run unit tests
run: |
spread google:
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
git fetch --depth=1 origin ae284792596e00d325a1787604fe4ec7e00574aa
git checkout FETCH_HEAD
go build -o spread-testing ./cmd/spread
sudo cp spread-testing /usr/bin/spread
cd ..
rm -Rf spread-testing

- name: Run spread tests
env:
SPREAD_GOOGLE_KEY: ${{ secrets.SPREAD_GOOGLE_KEY }}
run: |
echo "$SPREAD_GOOGLE_KEY" | sha1sum
/usr/bin/spread google:

- name: Discard spread workers
if: always()
Expand Down
Loading