Skip to content

Set release version and date #101

Set release version and date

Set release version and date #101

name: nomad-integration-test
on: [push]
jobs:
nomad-integration-test:
env:
TEST_PLATFORM: nomad
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
-
name: Checkout code
uses: actions/checkout@v3
-
name: Go build
run: CGO_ENABLED=0 GOOS=linux go build -o grid-intensity .
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Docker build
uses: docker/build-push-action@v4
with:
context: .
load: true
tags: thegreenwebfoundation/grid-intensity:integration-test
-
name: Add HashiCorp GPG key
run: curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
-
name: Add HashiCorp Linux repository
run: sudo apt-add-repository "deb [arch=amd64] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
-
name: Install nomad
run: sudo apt-get update && sudo apt-get install nomad
-
name: Start running nomad in agent mode, then background it
run: sudo nomad agent --dev --node dev01 &
-
name: Submit the grid-intensity-exporter.nomad job to nomad
run: nomad run ./nomad/grid-intensity-exporter.nomad
-
name: Run integration test
run: go test -v -tags=dockerrequired ./integration/test/exporter