-
Notifications
You must be signed in to change notification settings - Fork 527
66 lines (56 loc) · 1.68 KB
/
functional-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
---
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@e5bb06c2ca53b244f978d33348d18317a7f263ce # v2.2.2
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 }}