Skip to content

Commit cbd0f36

Browse files
James Kunstlecourtneypacheco
andcommitted
fix unit-testing workflow file
workflow file had wrong name and step return value. this amends that so that the workflow can run. Co-authored-by: James Kunstle <jkunstle@redhat.com> Co-authored-by: Courtney Pacheco <6019922+courtneypacheco@users.noreply.github.com> Signed-off-by: James Kunstle <jkunstle@redhat.com>
1 parent a1c700d commit cbd0f36

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

.github/workflows/unittesting-ci-nvidia.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ on:
1919

2020
env:
2121
pytest_mark: "fast"
22-
ec2_runner_variant: "m7i.xlarge" # 4 Xeon CPU, 16GB RAM
22+
ec2_runner_variant: "g4dn.12xlarge" # T4 machine that would support an nvidia-smi call.
23+
# ec2_runner_variant: "m7i.xlarge" # 4 Xeon CPU, 16GB RAM
2324

2425
jobs:
2526
start-ec2-runner:
2627
runs-on: ubuntu-latest
2728
outputs:
2829
label: ${{ steps.start-ec2-runner.outputs.label }}
29-
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.label }}
30+
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id}}
3031

3132
steps:
3233
- name: "Harden runner"
@@ -48,7 +49,7 @@ jobs:
4849
mode: start
4950
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
5051
ec2-image-id: ${{ vars.AWS_EC2_AMI }}
51-
ec2-instance-type: ${{ vars.AWS_REGION }}
52+
ec2-instance-type: ${{ env.ec2_runner_variant }}
5253
subnet-id: subnet-024298cefa3bedd61
5354
security-group-id: sg-06300447c4a5fbef3
5455
iam-role-name: instructlab-ci-runner
@@ -104,6 +105,7 @@ jobs:
104105
105106
- name: "Run unit tests with Tox and Pytest"
106107
run: |
108+
source venv/bin/activate
107109
tox -e py3-unit -- -m ${{env.pytest_mark}}
108110
109111
- name: "Show disk utilization AFTER tests"
@@ -115,11 +117,13 @@ jobs:
115117
- start-ec2-runner
116118
- run-unit-tests
117119
runs-on: ubuntu-latest
120+
if: ${{ always() }}
118121
steps:
119122
- name: "Harden runner"
120123
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.1
121124
with:
122125
egress-policy: audit
126+
123127
- name: "Configure AWS credentials"
124128
uses: "aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502" # v4.0.2
125129
with:
@@ -128,10 +132,9 @@ jobs:
128132
aws-region: ${{ vars.AWS_REGION }}
129133

130134
- name: "Stop EC2 runner"
131-
id: start-ec2-runner
132135
uses: machulav/ec2-github-runner@1827d6ca7544d7044ddbd2e9360564651b463da2 # v2.3.7
133136
with:
134137
mode: stop
135138
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
136139
label: ${{ needs.start-ec2-runner.outputs.label }}
137-
ec2-instance-type: ${{ env.ec2_runner_variant }}
140+
ec2-instance-id: ${{ needs.start-ec2-runner.outputs.ec2-instance-id }}

0 commit comments

Comments
 (0)