From b9d62995662a86c5b8eeb053c245ecfbd801458f Mon Sep 17 00:00:00 2001 From: MSalopek <35486649+MSalopek@users.noreply.github.com> Date: Mon, 23 Jan 2023 15:52:29 +0100 Subject: [PATCH] add manual integration tests GH workflow (#665) * add manual integration tests GH workflow * add nightly integration tests * update with review comments Co-authored-by: Marius Poke --- .github/workflows/manual-integration.yml | 26 +++++++++ .github/workflows/nightly-integration.yml | 68 +++++++++++++++++++++++ 2 files changed, 94 insertions(+) create mode 100644 .github/workflows/manual-integration.yml create mode 100644 .github/workflows/nightly-integration.yml diff --git a/.github/workflows/manual-integration.yml b/.github/workflows/manual-integration.yml new file mode 100644 index 0000000000..4b9b743b06 --- /dev/null +++ b/.github/workflows/manual-integration.yml @@ -0,0 +1,26 @@ +# manually run full integration test suite +# all tests are run sequentially +name: manual-integration-main +on: + workflow_dispatch: + +jobs: + manual-integration-main: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v3 + with: + go-version: '1.18' + - uses: actions/checkout@v3 + + - name: Checkout LFS objects + run: git lfs checkout + + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: "1.18" # The Go version to download (if necessary) and use. + + - name: Integration tests + run: make test-integration diff --git a/.github/workflows/nightly-integration.yml b/.github/workflows/nightly-integration.yml new file mode 100644 index 0000000000..7c3480e746 --- /dev/null +++ b/.github/workflows/nightly-integration.yml @@ -0,0 +1,68 @@ +# Run integration tests nightly on main + +# !! Relevant changes to this file should be propagated manual-integration.yml + +name: nightly-integration-main +on: + schedule: + # run every day at 03:00 UTC + # ┌───────────── minute (0 - 59) + # │ ┌───────────── hour (0 - 23) + # │ │ ┌───────────── day of the month (1 - 31) + # │ │ │ ┌───────────── month (1 - 12 or JAN-DEC) + # │ │ │ │ ┌───────────── day of the week (0 - 6 or SUN-SAT) + # │ │ │ │ │ + # │ │ │ │ │ + # │ │ │ │ │ + # * * * * * + - cron: '0 3 * * *' + +jobs: + nightly-test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/setup-go@v3 + with: + go-version: '1.18' + + - uses: actions/checkout@v3 + + - name: Integration tests + run: make test-integration + + + nightly-test-fail: + needs: nightly-test + if: ${{ failure() }} + runs-on: ubuntu-latest + steps: + - name: Notify Slack on failure + uses: slackapi/slack-github-action@v1.23.0 + env: + SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} + SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + BRANCH: ${{ github.ref_name }} + RUN_URL: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + COMMITS_URL: "${{ github.server_url }}/${{ github.repository }}/commits/${{ github.ref_name }}" + with: + payload: | + { + "blocks": [ + { + "type": "header", + "text": { + "type": "plain_text", + "text": "❗Integration tests failed❗", + "emoji": true + } + }, + { + "type": "section", + "text": { + "type": "mrkdwn", + "text": ":skull: Nightly E2E tests for `${{ env.BRANCH }}` failed.\n\nSee the <${{ env.RUN_URL }}|run details> and the <${{ env.COMMITS_URL }}|latest commits> possibly related to the failure." + } + } + ] + }