Skip to content

Commit

Permalink
add manual integration tests GH workflow (#665)
Browse files Browse the repository at this point in the history
* add manual integration tests GH workflow

* add nightly integration tests

* update with review comments

Co-authored-by: Marius Poke <[email protected]>
  • Loading branch information
MSalopek and mpoke authored Jan 23, 2023
1 parent b40cd50 commit b9d6299
Show file tree
Hide file tree
Showing 2 changed files with 94 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/manual-integration.yml
Original file line number Diff line number Diff line change
@@ -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
68 changes: 68 additions & 0 deletions .github/workflows/nightly-integration.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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."
}
}
]
}

0 comments on commit b9d6299

Please sign in to comment.