# What this PR does
- Use cross-plugin e2e tests setup (cloning ops-devenv, gops-labels)
only on a daily runs and on dev/main branch pipelines (exclude it from
PRs so that community PRs don't rely on secrets)
- Rename "Daily e2e tests" to "Expensive e2e tests" and run them both
daily and when PRs are merged to dev/main
- Post Slack message only if e2e tests fail
## Checklist
- [x] Unit, integration, and e2e (if applicable) tests updated
- [x] Documentation added (or `pr:no public docs` PR label added if not
required)
- [x] Added the relevant release notes label (see labels prefixed w/
`release:`). These labels dictate how your PR will
show up in the autogenerated release notes.
---------
Co-authored-by: Joey Orlando <joey.orlando@grafana.com>
71 lines
2.2 KiB
YAML
71 lines
2.2 KiB
YAML
name: Expensive e2e tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
# allows manual run on github actions
|
|
workflow_dispatch:
|
|
schedule:
|
|
- cron: "0 6 * * 1-5"
|
|
|
|
jobs:
|
|
end-to-end-tests:
|
|
name: Expensive e2e tests
|
|
strategy:
|
|
matrix:
|
|
grafana_version:
|
|
# OnCall doesn't work on the following versions of Grafana
|
|
# - 8.5.22
|
|
# - 9.0.0
|
|
# - 9.1.0
|
|
|
|
# 10.0.11 is the earliest version where things work
|
|
# - 9.2.20
|
|
# - 9.3.16
|
|
# - 9.4.13
|
|
# - 9.5.7
|
|
- 10.0.11
|
|
- 10.1.7
|
|
# TODO: fix issues with running e2e tests against Grafana v10.2.x and v10.3.x
|
|
# - 10.2.4
|
|
# - latest
|
|
fail-fast: false
|
|
uses: ./.github/workflows/e2e-tests.yml
|
|
with:
|
|
grafana_version: ${{ matrix.grafana_version }}
|
|
run-expensive-tests: true
|
|
# TODO: fix issues with some tests on firefox and webkit
|
|
# example CI build with firefox/webkit failing tests
|
|
# https://github.com/grafana/oncall/actions/runs/8022194346/job/21915964672#step:19:905
|
|
# browsers: "chromium firefox webkit"
|
|
browsers: "chromium"
|
|
secrets: inherit
|
|
|
|
post-status-to-slack:
|
|
runs-on: ubuntu-latest
|
|
needs: end-to-end-tests
|
|
if: failure
|
|
steps:
|
|
# Useful references
|
|
# https://stackoverflow.com/questions/59073850/github-actions-get-url-of-test-build
|
|
# https://github.com/orgs/community/discussions/26822#discussioncomment-3305794
|
|
#
|
|
- uses: slackapi/slack-github-action@v1.24.0
|
|
with:
|
|
channel-id: gops-oncall-dev
|
|
# yamllint disable rule:line-length
|
|
payload: |
|
|
{
|
|
"blocks": [
|
|
{
|
|
"type": "section",
|
|
"text": {
|
|
"type": "mrkdwn",
|
|
"text": "Daily e2e tests build result: ${{ needs.end-to-end-tests.result == 'success' && ':check:' || ':alert:' }}\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
}
|
|
}
|
|
]
|
|
}
|
|
# yamllint enable rule:line-length
|
|
env:
|
|
SLACK_BOT_TOKEN: ${{ secrets.SLACK_DAILY_E2E_TESTS_BOT_TOKEN }}
|