From 874c46a252070285ea3b31345573b7f4d5af866d Mon Sep 17 00:00:00 2001 From: Victor Martinez Date: Fri, 13 Dec 2024 13:18:29 +0100 Subject: [PATCH] github-actions: support for functional-tests --- .github/workflows/functional-tests.yml | 53 ++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/functional-tests.yml diff --git a/.github/workflows/functional-tests.yml b/.github/workflows/functional-tests.yml new file mode 100644 index 0000000000..5194f02376 --- /dev/null +++ b/.github/workflows/functional-tests.yml @@ -0,0 +1,53 @@ +--- +name: functional-tests + +on: + workflow_dispatch: ~ + schedule: + - cron: '0 3 * * 1-5' + +permissions: + contents: read + id-token: write + +jobs: + run: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + environment: + - 'qa' + - 'pro' + steps: + - uses: actions/checkout@v4 + + - 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: cd functionaltests && go test -v ./ + + 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 }}