Skip to content

Commit 1691f70

Browse files
Add on-pr integration tests
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent b457247 commit 1691f70

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/e2e.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,46 @@ on:
2525
- release-*
2626

2727
jobs:
28+
dru-run-tests:
29+
runs-on: linux-amd64-gpu-l4-latest-1
30+
steps:
31+
- name: Check out code
32+
uses: actions/checkout@v4
33+
34+
- name: Calculate build vars
35+
id: vars
36+
run: |
37+
echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
38+
echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV
39+
GOLANG_VERSION=$(./hack/golang-version.sh)
40+
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
41+
42+
- name: Install Go
43+
uses: actions/setup-go@v5
44+
with:
45+
go-version: ${{ env.GOLANG_VERSION }}
46+
47+
- name: Run e2e tests
48+
env:
49+
IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/container-toolkit
50+
VERSION: ${COMMIT_SHORT_SHA}
51+
run: |
52+
make -f tests/e2e/Makefile test
53+
54+
- name: Send Slack alert notification
55+
id: slack
56+
if: ${{ failure() }}
57+
uses: slackapi/[email protected]
58+
env:
59+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
60+
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
61+
with:
62+
channel-id: ${{ secrets.SLACK_CHANNEL_ID }}
63+
slack-message: |
64+
:x: On repository ${{ github.repository }} the Workflow *${{ github.workflow }}* has failed.
65+
66+
Details: ${{ env.SUMMARY_URL }}
67+
2868
e2e-tests:
2969
runs-on: linux-amd64-cpu4
3070
if: ${{ github.event.workflow_run.conclusion == 'success' }} && ${{ github.event.workflow_run.event == 'push' }}

0 commit comments

Comments
 (0)