Skip to content

removed test in rds #51

removed test in rds

removed test in rds #51

name: Running Terratest and Deploy Report Github Pages
on: push
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
TF_VAR_aws_key_pub: ${{secrets.TF_VAR_aws_key_pub}}
jobs:
terratest:
name: terratest
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
with:
terraform_version: "1.6.6"
- uses: actions/setup-go@v4
with:
go-version: '1.21.6'
cache-dependency-path: |
tests/go.sum
- name: setup terratest
run: |
export PATH=$PATH:/usr/bin/
cd tests
go mod download
cd /usr/bin/
go install github.com/vakenbolt/go-test-report@v0.9.3
- name: run tests
run: |
cd $GITHUB_WORKSPACE/tests
go test -v -timeout 30m -json | go-test-report -o reports/index.html -t Report_Terratest_Infrastructure_provisioned_by_Terraform -s "32" -g 1 || true
- name: upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: './tests/reports/'
deploy:
needs: terratest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3