Skip to content

CXF-83184: Adding NIMF-METAL-2-AWS Example #14

CXF-83184: Adding NIMF-METAL-2-AWS Example

CXF-83184: Adding NIMF-METAL-2-AWS Example #14

name: terratests-metal-nimf-suite
on:
pull_request:
workflow_dispatch:
jobs:
setup-tests:
name: Setup NIMF DIGP Tests
runs-on: ubuntu-latest
env:
TF_VAR_equinix_client_id: ${{ secrets.EQUINIX_CLIENT_ID }}
TF_VAR_equinix_client_secret: ${{ secrets.EQUINIX_CLIENT_SECRET }}
TF_VAR_metal_auth_token: ${{ secrets.METAL_AUTH_TOKEN }}
TEST_DATA_PROD_METAL_NIMF_2_AWS_CONNECTION: ${{ secrets.TEST_DATA_PROD_METAL_NIMF_2_AWS_CONNECTION }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: './go.mod'
id: go
- name: Get dependencies
run: |
go mod download
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: ${{ matrix.terraform }}
terraform_wrapper: false
- name: Set Connection Name variable
run: echo "TF_VAR_connection_name=nimf_$(date +'%Y%m%d%H%M%S')" >> $GITHUB_ENV
- name: Setup Variables Files
run: |
echo $TEST_DATA_PROD_METAL_NIMF_2_AWS_CONNECTION >> "./examples/metal-nimf-2-aws-connection/terraform.tfvars.json"
- name: Run Go Tests
run:
go test ./tests/prod/metal-nimf -v -coverprofile coverage_metal_nimf_modules.txt -covermode=atomic -count 1 -parallel 8 -timeout 180m
- name: Upload test coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage_metal-nimf_modules.txt