Skip to content

Commit

Permalink
Fix job queue, executable script, PR trigger
Browse files Browse the repository at this point in the history
  • Loading branch information
farshidtz committed Jul 30, 2024
1 parent 0716b3e commit 3e791aa
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 12 deletions.
28 changes: 19 additions & 9 deletions .github/workflows/nvidia-test.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: Nvidia Graphics Tests

on:
workflow_run:
workflows:
- "Smoke Test"
types:
- completed
# TODO: remove this trigger which is for testing
pull_request:
branches: [ main ]
# Manual trigger
workflow_dispatch:

jobs:

Expand Down Expand Up @@ -40,15 +40,18 @@ jobs:
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
# - 202007-28059
# - 202008-2816s7
# - 202112-29789
data_source:
- "distro: noble"
# noprovision node, for CI testing
- 202302-31212
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -57,10 +60,17 @@ jobs:
# 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: .github/workflows/testflinger/nvidia.yaml
job-path: ${{ steps.create-job.outputs.job }}

Empty file modified .github/workflows/scripts/wait_for_port.sh
100644 → 100755
Empty file.
6 changes: 3 additions & 3 deletions .github/workflows/testflinger/nvidia.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
job_queue: ${{ matrix.queue }}
job_queue: $JOB_QUEUE
global_timeout: 3600
output_timeout: 1800
provision_data:
Expand All @@ -24,8 +24,8 @@ test_data:
# Setup the environment on the target device
ssh ubuntu@$DEVICE_IP "$(< $SCRIPTS/setup.sh)"
# Reboot it
ssh ubuntu@$DEVICE_IP "sudo reboot &"
# Reboot the device in background to avoid breaking the SSH connection prematurely
ssh ubuntu@$DEVICE_IP "(sleep 3 && sudo reboot) &"
echo "Wait for the device to boot and start its SSH server"
$SCRIPTS/wait_for_port.sh $DEVICE_IP 22
Expand Down

0 comments on commit 3e791aa

Please sign in to comment.