Skip to content

functional-tests

functional-tests #32

---
name: functional-tests
on:
workflow_dispatch: ~
schedule:
- cron: '0 3 * * 1-5'
permissions:
contents: read
id-token: write
env:
TF_VAR_BRANCH: ${{ github.ref_name }}
TF_VAR_BUILD_ID: ${{ github.run_id }}
TF_VAR_ENVIRONMENT: 'ci'
TF_VAR_REPO: ${{ github.repository }}
TERRAFORM_VERSION: 1.10.2
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
environment:
- 'qa'
- 'pro'
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
with:
terraform_version: "${{ env.TERRAFORM_VERSION }}"
- uses: actions/setup-go@v5
with:
go-version-file: 'functionaltests/go.mod'
- uses: elastic/oblt-actions/google/auth@v1
- uses: google-github-actions/get-secretmanager-secrets@a8440875e1c2892062aef9061228d4f1af8f919b # v2.2.3
with:
export_to_environment: true
secrets: |-
EC_API_KEY:elastic-observability/elastic-cloud-observability-team-${{ matrix.environment }}-api-key
- run: |
export TF_VAR_CREATED_DATE=$(date +%s)
cd functionaltests && go test -v -timeout=30m -target "${{ matrix.environment }}" ./
notify:
if: always()
runs-on: ubuntu-latest
needs:
- run
steps:
- id: check
uses: elastic/oblt-actions/check-dependent-jobs@v1
with:
jobs: ${{ toJSON(needs) }}
- uses: elastic/oblt-actions/slack/notify-result@v1
with:
bot-token: ${{ secrets.SLACK_BOT_TOKEN }}
channel-id: "#apm-server"
status: ${{ steps.check.outputs.status }}