Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
10 changes: 10 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ jobs:
secrets: inherit
with:
version: ${{ needs.basic.outputs.version }}

e2e-test:
needs:
- image
- basic
secrets: inherit
uses: ./.github/workflows/e2e.yaml
with:
version: ${{ needs.basic.outputs.version }}
golang_version: ${{ needs.basic.outputs.golang_version }}
97 changes: 97 additions & 0 deletions .github/workflows/e2e.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# Copyright 2025 NVIDIA CORPORATION
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: End-to-end Tests

on:
workflow_call:
inputs:
version:
required: true
type: string
golang_version:
required: true
type: string
secrets:
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
AWS_SSH_KEY:
required: true
SLACK_BOT_TOKEN:
required: true
SLACK_CHANNEL_ID:
required: true

jobs:
e2e-tests:
runs-on: linux-amd64-cpu4
steps:
- name: Check out code
uses: actions/checkout@v4

- name: Install Go
uses: actions/setup-go@v5
with:
go-version: ${{ inputs.golang_version }}

- name: Set up Holodeck
uses: NVIDIA/[email protected]
with:
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws_ssh_key: ${{ secrets.AWS_SSH_KEY }}
holodeck_config: "tests/e2e/infra/holodeck.yaml"

- name: Run e2e tests
env:
KUBECONFIG: ${{ github.workspace }}/kubeconfig
HELM_CHART: ${{ github.workspace }}/deployments/helm/nvidia-dra-driver-gpu
E2E_IMAGE_REPO: ghcr.io/nvidia/k8s-dra-driver-gpu
E2E_IMAGE_TAG: ${{ inputs.version }}-ubi9
E2E_IMAGE_PULL_POLICY: IfNotPresent
LOG_ARTIFACTS_DIR: ${{ github.workspace }}/e2e_logs
run: |
make -f tests/e2e/Makefile test-e2e

- name: Archive test logs
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: e2e-test-logs
path: ./e2e_logs/
retention-days: 15

- name: Archive Ginkgo logs
uses: actions/upload-artifact@v4
with:
name: ginkgo-logs
path: ginkgo.json
retention-days: 15

- name: Post text to a Slack channel
if: ${{ failure() }}
uses: slackapi/[email protected]
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
SUMMARY_URL: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}
with:
method: chat.postMessage
token: ${{ secrets.SLACK_BOT_TOKEN }}
payload: |
channel: ${{ secrets.SLACK_CHANNEL_ID }}
text: ":x: On repository ${{ github.repository }} the Workflow *${{ github.workflow }}* has failed.

Details: ${{ env.SUMMARY_URL }}"
4 changes: 4 additions & 0 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,22 @@ jobs:
steps:
- uses: actions/checkout@v4
name: Check out code

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0-28

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image
env:
IMAGE_NAME: ghcr.io/nvidia/k8s-dra-driver-gpu
Expand Down
24 changes: 24 additions & 0 deletions tests/e2e/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
.PHONY: test-e2e ginkgo

GINKGO_ARGS ?=
LOG_ARTIFACTS_DIR ?= $(CURDIR)/e2e_logs

ginkgo:
mkdir -p $(CURDIR)/bin
GOBIN=$(CURDIR)/bin go install github.com/onsi/ginkgo/v2/ginkgo@latest

test-e2e: ginkgo
$(CURDIR)/bin/ginkgo $(GINKGO_ARGS) -v --json-report $(CURDIR)/ginkgo.json ./tests/e2e/...
Loading