Skip to content

Commit 29121b3

Browse files
committed
tests.yaml
1 parent b6283db commit 29121b3

2 files changed

Lines changed: 76 additions & 4 deletions

File tree

.github/workflows/test.yaml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: GPU tests
22
on:
3-
push:
4-
branches: [main]
5-
pull_request:
6-
branches: [main]
73
workflow_dispatch:
84
inputs:
95
instance_type:
@@ -18,6 +14,12 @@ on:
1814
- g6.xlarge # 4 vCPUs, 16GB RAM, L4 GPU
1915
- g6.2xlarge # 8 vCPUs, 32GB RAM, L4 GPU
2016
- g6.4xlarge # 16 vCPUs, 64GB RAM, L4 GPU
17+
workflow_call:
18+
inputs:
19+
instance_type:
20+
description: 'EC2 instance type'
21+
required: true
22+
type: string
2123
permissions:
2224
id-token: write
2325
contents: read

.github/workflows/tests.yaml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: GPU tests on multiple instance types
2+
on:
3+
push:
4+
branches: [main]
5+
pull_request:
6+
branches: [main]
7+
workflow_dispatch:
8+
9+
permissions:
10+
id-token: write
11+
contents: read
12+
13+
jobs:
14+
test-g5:
15+
name: Test on g5.2xlarge (A10G)
16+
uses: ./.github/workflows/test.yaml
17+
with:
18+
instance_type: g5.2xlarge
19+
secrets: inherit
20+
21+
test-g6:
22+
name: Test on g6.2xlarge (L4)
23+
uses: ./.github/workflows/test.yaml
24+
with:
25+
instance_type: g6.2xlarge
26+
secrets: inherit
27+
28+
summary:
29+
name: Test Summary
30+
needs: [test-g5, test-g6]
31+
runs-on: ubuntu-latest
32+
if: always()
33+
steps:
34+
- name: Summary
35+
run: |
36+
echo "## Test Results Summary" >> $GITHUB_STEP_SUMMARY
37+
echo "" >> $GITHUB_STEP_SUMMARY
38+
39+
# Check g5.2xlarge result
40+
if [ "${{ needs.test-g5.result }}" == "success" ]; then
41+
echo "✅ **g5.2xlarge (A10G)**: Tests passed" >> $GITHUB_STEP_SUMMARY
42+
elif [ "${{ needs.test-g5.result }}" == "failure" ]; then
43+
echo "❌ **g5.2xlarge (A10G)**: Tests failed" >> $GITHUB_STEP_SUMMARY
44+
elif [ "${{ needs.test-g5.result }}" == "cancelled" ]; then
45+
echo "⚠️ **g5.2xlarge (A10G)**: Tests cancelled" >> $GITHUB_STEP_SUMMARY
46+
else
47+
echo "⏭️ **g5.2xlarge (A10G)**: Tests skipped" >> $GITHUB_STEP_SUMMARY
48+
fi
49+
50+
# Check g6.2xlarge result
51+
if [ "${{ needs.test-g6.result }}" == "success" ]; then
52+
echo "✅ **g6.2xlarge (L4)**: Tests passed" >> $GITHUB_STEP_SUMMARY
53+
elif [ "${{ needs.test-g6.result }}" == "failure" ]; then
54+
echo "❌ **g6.2xlarge (L4)**: Tests failed" >> $GITHUB_STEP_SUMMARY
55+
elif [ "${{ needs.test-g6.result }}" == "cancelled" ]; then
56+
echo "⚠️ **g6.2xlarge (L4)**: Tests cancelled" >> $GITHUB_STEP_SUMMARY
57+
else
58+
echo "⏭️ **g6.2xlarge (L4)**: Tests skipped" >> $GITHUB_STEP_SUMMARY
59+
fi
60+
61+
echo "" >> $GITHUB_STEP_SUMMARY
62+
echo "### GPU Details" >> $GITHUB_STEP_SUMMARY
63+
echo "- **g5.2xlarge**: NVIDIA A10G (Ampere, compute capability 8.6)" >> $GITHUB_STEP_SUMMARY
64+
echo "- **g6.2xlarge**: NVIDIA L4 (Ada Lovelace, compute capability 8.9)" >> $GITHUB_STEP_SUMMARY
65+
66+
# Set overall status
67+
if [ "${{ needs.test-g5.result }}" == "failure" ] || [ "${{ needs.test-g6.result }}" == "failure" ]; then
68+
echo "::error::One or more test jobs failed"
69+
exit 1
70+
fi

0 commit comments

Comments
 (0)