Skip to content

Commit

Permalink
split solutions tests
Browse files Browse the repository at this point in the history
  • Loading branch information
rawdaGastan committed Sep 29, 2024
1 parent 8efd039 commit dae67f1
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 25 deletions.
32 changes: 8 additions & 24 deletions .github/workflows/terratest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,7 @@ jobs:
{name: "gateway-private", test: "go test -v ./... --tags=integration -run TestGatewayPrivate"},
{name: "wireguard", test: "go test -v ./... --tags=integration -run TestWireguard"},
{name: "zdb", test: "go test -v ./... --tags=integration -run TestZdbs"},
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"},
{name: "peertube", test: "go test -v ./... --tags=integration -run TestPeertube"},
{name: "presearch", test: "go test -v ./... --tags=integration -run TestPresearch"},
{name: "taiga", test: "go test -v ./... --tags=integration -run TestTaiga"},
{name: "mattermost", test: "go test -v ./... --tags=integration -run TestMattermost"}]
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"}]

steps:
- uses: actions/setup-go@v5
Expand All @@ -39,7 +35,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.8.5
terraform-version: 1.9.6
- name: install wg and yggdrasil and add peers
run: |
sudo apt-get update
Expand Down Expand Up @@ -87,11 +83,7 @@ jobs:
{name: "gateway-private", test: "go test -v ./... --tags=integration -run TestGatewayPrivate"},
{name: "wireguard", test: "go test -v ./... --tags=integration -run TestWireguard"},
{name: "zdb", test: "go test -v ./... --tags=integration -run TestZdbs"},
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"},
{name: "peertube", test: "go test -v ./... --tags=integration -run TestPeertube"},
{name: "presearch", test: "go test -v ./... --tags=integration -run TestPresearch"},
{name: "taiga", test: "go test -v ./... --tags=integration -run TestTaiga"},
{name: "mattermost", test: "go test -v ./... --tags=integration -run TestMattermost"}]
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"}]

steps:
- uses: actions/setup-go@v5
Expand All @@ -101,7 +93,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.8.5
terraform-version: 1.9.6
- name: install wg and yggdrasil and add peers
run: |
sudo apt-get update
Expand Down Expand Up @@ -149,11 +141,7 @@ jobs:
{name: "gateway-private", test: "go test -v ./... --tags=integration -run TestGatewayPrivate"},
{name: "wireguard", test: "go test -v ./... --tags=integration -run TestWireguard"},
{name: "zdb", test: "go test -v ./... --tags=integration -run TestZdbs"},
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"},
{name: "peertube", test: "go test -v ./... --tags=integration -run TestPeertube"},
{name: "presearch", test: "go test -v ./... --tags=integration -run TestPresearch"},
{name: "taiga", test: "go test -v ./... --tags=integration -run TestTaiga"},
{name: "mattermost", test: "go test -v ./... --tags=integration -run TestMattermost"}]
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"}]

steps:
- uses: actions/setup-go@v5
Expand All @@ -163,7 +151,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.8.5
terraform-version: 1.9.6
- name: install wg and yggdrasil and add peers
run: |
sudo apt-get update
Expand Down Expand Up @@ -211,11 +199,7 @@ jobs:
{name: "gateway-private", test: "go test -v ./... --tags=integration -run TestGatewayPrivate"},
{name: "wireguard", test: "go test -v ./... --tags=integration -run TestWireguard"},
{name: "zdb", test: "go test -v ./... --tags=integration -run TestZdbs"},
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"},
{name: "peertube", test: "go test -v ./... --tags=integration -run TestPeertube"},
{name: "presearch", test: "go test -v ./... --tags=integration -run TestPresearch"},
{name: "taiga", test: "go test -v ./... --tags=integration -run TestTaiga"},
{name: "mattermost", test: "go test -v ./... --tags=integration -run TestMattermost"}]
{name: "qsfs", test: "go test -v ./... --tags=integration -run TestQSFS"}]

steps:
- uses: actions/setup-go@v5
Expand All @@ -225,7 +209,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.8.5
terraform-version: 1.9.6
- name: install wg and yggdrasil and add peers
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_modules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.8.5
terraform-version: 1.9.6
- name: install wg and yggdrasil and add peers
run: |
sudo apt-get update
Expand Down
68 changes: 68 additions & 0 deletions .github/workflows/test_solutions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: Intgeration tests for solutions

on:
schedule:
- cron: "0 2 * * *"
workflow_dispatch:

jobs:
go-tests:
name: Run Go Tests
runs-on: ubuntu-latest
timeout-minutes: 0
strategy:
fail-fast: false
matrix:
network: ["dev", "qa", "test", "main"]
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21
- uses: autero1/[email protected]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.9.6
- name: install 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/AhmedHanafy725/yggdrasil-config/main/config.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/yggdrasil.conf
sudo systemctl restart yggdrasil
- uses: actions/[email protected]
with:
fetch-depth: 0
- name: Build
run: |
go mod tidy
mkdir -p ~/.terraform.d/plugins/threefoldtechdev.com/providers/grid/0.2/linux_amd64/
go build -o terraform-provider-grid
mv terraform-provider-grid ~/.terraform.d/plugins/threefoldtechdev.com/providers/grid/0.2/linux_amd64/
- name: Test kubernetes module
env:
MNEMONIC: ${{ secrets.MNEMONICS }}
MNEMONICS: ${{ secrets.MNEMONICS }}
NETWORK: ${{ matrix.network }}
working-directory: integrationtests
run: |
go test -v ./... --tags=integration -run TestModuleK8s
- name: Test nomad module
env:
MNEMONIC: ${{ secrets.MNEMONICS }}
NETWORK: ${{ matrix.network }}
working-directory: integrationtests
run: |
go test -v ./... --tags=integration -run TestPeertube
go test -v ./... --tags=integration -run TestPresearch
go test -v ./... --tags=integration -run TestTaiga
go test -v ./... --tags=integration -run TestMattermost

0 comments on commit dae67f1

Please sign in to comment.