Skip to content

e2e

e2e #2074

Workflow file for this run

name: e2e
on:
pull_request:
paths-ignore:
- 'CODE_OF_CONDUCT.md'
- 'README.md'
- 'Contributing.md'
branches:
- main
push:
branches:
- main
schedule:
- cron: '0 6 * * *' # 6 AM UTC everyday for default branch
permissions:
contents: read # for actions/checkout to fetch code
jobs:
run-e2e-suite:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ github.workspace }}/go.mod'
- name: Restore Go cache
uses: actions/cache@v4
with:
path: /home/runner/work/_temp/_github_home/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Kubernetes
uses: helm/kind-action@v1.10.0
with:
install_only: true
- uses: yokawasa/action-setup-kube-tools@v0.11.2
with:
kustomize: '5.0.1'
tilt: '0.32.2'
- name: Run E2E tests
id: e2e-tests
run: make e2e-verbose
- name: Notify on Failure
id: slack-notification
uses: slackapi/slack-github-action@v2.0.0
if: ${{ github.ref_name == 'main' && github.event_name == 'schedule' && always() }}
with:
# Slack channel id, channel name, or user id to post message.
# See also: https://api.slack.com/methods/chat.postMessage#channels
# You can pass in multiple channels to post to by providing a comma-delimited list of channel IDs.
channel-id: 'C03NF7KH128'
# For posting a simple plain text message
payload: |
{
"text": "${{ github.repository }} e2e Tests Status: ${{ steps.e2e-tests.conclusion }}",
"blocks": [
{
"type": "section",
"text":
{
"type": "mrkdwn",
"text": "e2e Test for OCM Controller ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }} <https://github.com/open-component-model/ocm-controller/actions/workflows/e2e.yaml|Github Action>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.OCM_GITHUB_SLACK_BOT_TOKEN }}