Skip to content

e2e-mpas

e2e-mpas #1190

Workflow file for this run

name: e2e-mpas
on:
repository_dispatch:
types: [ component.controlplane.mpas.updated ]
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
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-e2e-suite:
runs-on: ubuntu-latest
steps:
- run: curl -s https://fluxcd.io/install.sh | sudo bash
- name: Checkout mpas repository
uses: actions/checkout@v4
with:
repository: ${{ github.repository }}
path: MPAS
- name: Checkout ocm-controller
uses: actions/checkout@v4
with:
repository: open-component-model/ocm-controller
path: ocm-controller
- name: Checkout mpas-project-controller
uses: actions/checkout@v4
with:
repository: open-component-model/mpas-project-controller
path: mpas-project-controller
- name: Checkout mpas-product-controller
uses: actions/checkout@v4
with:
repository: open-component-model/mpas-product-controller
path: mpas-product-controller
- name: Checkout replication-controller
uses: actions/checkout@v4
with:
repository: open-component-model/replication-controller
path: replication-controller
- name: Checkout git-controller
uses: actions/checkout@v4
with:
repository: open-component-model/git-controller
path: git-controller
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: '${{ github.workspace }}/MPAS/go.mod'
- name: Restore Go cache
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Setup Kubernetes
uses: helm/[email protected]
with:
install_only: true
- uses: yokawasa/[email protected]
with:
kustomize: '5.0.1'
tilt: '0.32.2'
- name: Run E2E tests
id: e2e-tests
working-directory: MPAS
run: make e2e
- name: Notify on Failure/Success
id: slack-notification
uses: slackapi/[email protected]
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 MPAS ${{ job.status == 'success' && ':white_check_mark:' || ':x:' }} <https://github.com/open-component-model/MPAS/actions/workflows/e2e.yaml|Github Action>"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.OCM_GITHUB_SLACK_BOT_TOKEN }}