Skip to content

CXF-86483 GHA Workflow for Port Connections #3

CXF-86483 GHA Workflow for Port Connections

CXF-86483 GHA Workflow for Port Connections #3

name: terratests-prod-suite
on:
pull_request:
workflow_dispatch:
jobs:
setup-tests:
name: Setup PROD Tests
runs-on: ubuntu-latest
env:
TEST_DATA_PROD_PORT_2_ALIBABA_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_ALIBABA_CONNECTION }}
TEST_DATA_PROD_PORT_2_AWS_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_AWS_CONNECTION }}
TEST_DATA_PROD_PORT_2_AZURE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_AZURE_CONNECTION }}
TEST_DATA_PROD_PORT_2_IBM2_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_IBM2_CONNECTION }}
TEST_DATA_PROD_PORT_2_PORT_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_PORT_CONNECTION }}
TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION: ${{ secrets.TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION }}
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- 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: Setup Variables Files
run: |
echo $TEST_DATA_PROD_PORT_2_ALIBABA_CONNECTION >> "./examples/port-2-alibaba-connection/terraform.tfvars.json"
echo $TEST_DATA_PROD_PORT_2_AWS_CONNECTION >> "./tests/prod/port-2-aws-connection/terraform.tfvars.json"
echo $TEST_DATA_PROD_PORT_2_AZURE_CONNECTION >> "./tests/prod/port-2-azure-connection/terraform.tfvars.json"
echo $TEST_DATA_PROD_PORT_2_IBM2_CONNECTION >> "./examples/port-2-ibm2-connection/terraform.tfvars.json"
echo $TEST_DATA_PROD_PORT_2_PORT_CONNECTION >> "./examples/port-2-port-connection/terraform.tfvars.json"
echo $TEST_DATA_PROD_PORT_2_PRIVATE_SERVICE_PROFILE_CONNECTION >> "./examples/port-2-private-service-profile-connection/terraform.tfvars.json"
- name: Run Go Tests
run:
go test ./tests/prod -v -coverprofile coverage_prod_modules.txt -covermode=atomic -count 1 -parallel 8 -timeout 180m
- name: Setup Node.js 20.11.1
uses: actions/setup-node@v2
with:
node-version: 20.11.1
- name: Upload test coverage to Codecov
if: ${{ always() }}
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage_prod_modules.txt