Skip to content

Grid3 Go Integration tests #199

Grid3 Go Integration tests

Grid3 Go Integration tests #199

name: Grid3 Go Integration tests
defaults:
run:
working-directory: grid-client
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
network: ["dev", "qa", "test", "main"]
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.21"
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
submodules: "true"
- name: Get dependencies
run: |
go mod download
- name: install curl, wg and yggdrasil and add peers
run: |
sudo apt-get update
sudo apt-get install -y wireguard
sudo apt-get install dirmngr
sudo apt-get install curl
gpg --fetch-keys https://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/key.txt
gpg --export 569130E8CA20FBC4CB3FDE555898470A764B32C9 | sudo apt-key add -
echo 'deb http://neilalexander.s3.dualstack.eu-west-2.amazonaws.com/deb/ debian yggdrasil' | sudo tee /etc/apt/sources.list.d/yggdrasil.list
sudo apt-get update
sudo apt-get install yggdrasil
sudo systemctl enable yggdrasil
PEERS=$(curl https://raw.githubusercontent.com/threefoldtech/zos-config/main/development.json | jq '.yggdrasil.peers[]' -r | sed 's/\//\\\//g' | sed -z 's/\n/\\n/g')
sudo sed -i -- 's/Peers\: \[\]/Peers: [\n'"$PEERS"']/g' /etc/yggdrasil.conf
sudo systemctl start yggdrasil
- name: Test
env:
MNEMONICS: ${{ secrets.MNEMONICS }}
NETWORK: ${{ matrix.network }}
run: go test -v ./integration_tests