Skip to content

Add Nvidia workflow and basic tests #16

Add Nvidia workflow and basic tests

Add Nvidia workflow and basic tests #16

Workflow file for this run

name: Nvidia Graphics Tests
on:
# TODO: remove this trigger which is for testing
pull_request:
branches: [ main ]
# Manual trigger
workflow_dispatch:
jobs:
# build-and-upload-artifact:
# runs-on: [ubuntu-latest]
# env:
# PR_NUMBER: ${{ github.event.number }}
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# wait-timeout-minutes: 2
# - name: Build docker snap
# uses: snapcore/action-build@v1
# id: snapcraft
# with:
# snapcraft-args: snap --output docker.snap
# - name: Install snapcraft
# run: |
# sudo snap install snapcraft --classic
# - name: Upload artifact to snapstore branch
# run: |
# export SNAPCRAFT_STORE_CREDENTIALS="${{ secrets.SNAPCRAFT_LOGIN }}"
# snapcraft upload ${{steps.snapcraft.outputs.snap}} --release latest/edge/pr-${{ env.PR_NUMBER }}
test:
# needs: build-and-upload-artifact
runs-on: [self-hosted, testflinger]
env:
JOB_TEMPLATE: .github/workflows/testflinger/nvidia.yaml
JOB: ${{ github.workspace }}/job.yaml
strategy:
fail-fast: true
matrix:
queue:
# - 202007-28059
# - 202008-2816s7
# - 202112-29789
# noprovision node, for CI testing
- 202302-31212
steps:
- name: Checkout code
uses: actions/checkout@v4
# - name: Setup upterm session
# uses: lhotari/action-upterm@v1
# with:
# wait-timeout-minutes: 2
- name: Create job queue
env:
job_queue: 202007-28059
run: |
envsubst < $JOB_TEMPLATE > $JOB
echo "job=$JOB" >> $GITHUB_OUTPUT
- name: Submit Testflinger job
uses: canonical/testflinger/.github/actions/submit@main
with:
poll: true
job-path: ${{ steps.create-job.outputs.job }}