Skip to content

Intgeration tests for modules #124

Intgeration tests for modules

Intgeration tests for modules #124

Workflow file for this run

name: Intgeration tests for modules
on:
schedule:
- cron: "0 0 * * *"
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/action-terraform@v3.0.1
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
with:
terraform-version: 1.9.6
- name: install wg and mycelium and add peers
run: |
sudo apt-get update
sudo apt-get install -y wireguard
sudo apt-get install dirmngr
sudo apt-get install curl
wget https://github.com/threefoldtech/mycelium/releases/download/v0.5.7/mycelium-x86_64-unknown-linux-musl.tar.gz
tar xzf mycelium-x86_64-unknown-linux-musl.tar.gz
sudo ./mycelium --peers tcp://188.40.132.242:9651 quic://185.69.166.8:9651 --tun-name utun9 -k /tmp/mycelium_priv_key.bin &
- uses: actions/checkout@v4.1.1
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 TestNomad