oncall-engine/.github/workflows/expensive-e2e-tests.yml
Dominik Broj 344cd0efde
Add missing labels permissions, fix tilt ci from ops-devenv, fix expensive e2e tests (#4842)
# What this PR does

- add missing labels-related permissions for external service account
used by new oncall init process
- fix expensive e2e tests in new oncall init process
- unify Grafana versions between standard and expensive e2e tests
- fix running tilt through ops-devenv in new oncall init process
- avoid duplicated standard e2e tests on workflows that run daily and on
merges to main

## Which issue(s) this PR closes

Related to https://github.com/grafana/oncall-private/issues/2656

<!--
*Note*: If you want the issue to be auto-closed once the PR is merged,
change "Related to" to "Closes" in the line above.
If you have more than one GitHub issue that this PR closes, be sure to
preface
each issue link with a [closing
keyword](https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/using-keywords-in-issues-and-pull-requests#linking-a-pull-request-to-an-issue).
This ensures that the issue(s) are auto-closed once the PR has been
merged.
-->

## 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 <joseph.t.orlando@gmail.com>
2024-08-19 18:17:10 +00:00

74 lines
2.4 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.1.7
- 10.3.3
# TODO: fix issues with running e2e tests against Grafana v10.2.x and v10.3.x
# - 10.2.4
# - latest
fail-fast: false
# Run one version at a time to avoid the issue when SMS notification are bundled together for multiple versions
# running at the same time (the affected test is in grafana-plugin/e2e-tests/alerts/sms.test.ts)
max-parallel: 1
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-irm-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 }}