|
| 1 | +# Copyright 2025 NVIDIA CORPORATION |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | +# linux-amd64-gpu-l4-latest-1 |
| 15 | + |
| 16 | +name: dry-run Tests |
| 17 | + |
| 18 | +on: |
| 19 | + workflow_run: |
| 20 | + workflows: [image] |
| 21 | + types: |
| 22 | + - completed |
| 23 | + branches: |
| 24 | + - "pull-request/[0-9]+" |
| 25 | + - main |
| 26 | + - release-* |
| 27 | + |
| 28 | +jobs: |
| 29 | + dru-run-tests: |
| 30 | + runs-on: linux-amd64-gpu-l4-latest-1 |
| 31 | + steps: |
| 32 | + - name: Check out code |
| 33 | + uses: actions/checkout@v4 |
| 34 | + |
| 35 | + - name: Calculate build vars |
| 36 | + id: vars |
| 37 | + run: | |
| 38 | + echo "COMMIT_SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV |
| 39 | + echo "LOWERCASE_REPO_OWNER=$(echo "${GITHUB_REPOSITORY_OWNER}" | awk '{print tolower($0)}')" >> $GITHUB_ENV |
| 40 | + GOLANG_VERSION=$(./hack/golang-version.sh) |
| 41 | + echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV |
| 42 | +
|
| 43 | + - name: Install Go |
| 44 | + uses: actions/setup-go@v5 |
| 45 | + with: |
| 46 | + go-version: ${{ env.GOLANG_VERSION }} |
| 47 | + |
| 48 | + - name: Run e2e tests |
| 49 | + env: |
| 50 | + IMAGE_NAME: ghcr.io/${LOWERCASE_REPO_OWNER}/container-toolkit |
| 51 | + VERSION: ${COMMIT_SHORT_SHA} |
| 52 | + run: | |
| 53 | + make -f tests/e2e/Makefile test |
| 54 | +
|
| 55 | + - name: Send Slack alert notification |
| 56 | + id: slack |
| 57 | + if: ${{ failure() }} |
| 58 | + |
| 59 | + env: |
| 60 | + SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} |
| 61 | + SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} |
| 62 | + with: |
| 63 | + channel-id: ${{ secrets.SLACK_CHANNEL_ID }} |
| 64 | + slack-message: | |
| 65 | + :x: On repository ${{ github.repository }} the Workflow *${{ github.workflow }}* has failed. |
| 66 | +
|
| 67 | + Details: ${{ env.SUMMARY_URL }} |
0 commit comments