Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes unit ec2-name
Browse files Browse the repository at this point in the history
Signed-off-by: James Kunstle <[email protected]>
JamesKunstle committed Jan 23, 2025

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent a1c700d commit 10d4c78
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/unittesting-ci-nvidia.yaml
Original file line number Diff line number Diff line change
@@ -19,14 +19,15 @@ on:

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

jobs:
start-ec2-runner:
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id}}

steps:
- name: "Harden runner"
@@ -48,7 +49,7 @@ jobs:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ${{ vars.AWS_EC2_AMI }}
ec2-instance-type: ${{ vars.AWS_REGION }}
ec2-instance-type: ${{ env.ec2_runner_variant }}
subnet-id: subnet-024298cefa3bedd61
security-group-id: sg-06300447c4a5fbef3
iam-role-name: instructlab-ci-runner
@@ -104,6 +105,7 @@ jobs:
- name: "Run unit tests with Tox and Pytest"
run: |
source venv/bin/activate
tox -e py3-unit -- -m ${{env.pytest_mark}}
- name: "Show disk utilization AFTER tests"
@@ -115,11 +117,13 @@ jobs:
- start-ec2-runner
- run-unit-tests
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: "Harden runner"
uses: step-security/harden-runner@cb605e52c26070c328afc4562f0b4ada7618a84e # v2.10.1
with:
egress-policy: audit

- name: "Configure AWS credentials"
uses: "aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502" # v4.0.2
with:
@@ -128,10 +132,9 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}

- name: "Stop EC2 runner"
id: start-ec2-runner
uses: machulav/ec2-github-runner@1827d6ca7544d7044ddbd2e9360564651b463da2 # v2.3.7
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-ec2-runner.outputs.label }}
ec2-instance-type: ${{ env.ec2_runner_variant }}
ec2-instance-id: ${{ needs.start-ec2-runner.outputs.ec2-instance-id }}

0 comments on commit 10d4c78

Please sign in to comment.