Skip to content

Commit 0db985e

Browse files
committed
test: local run of testinfra
1 parent 0ef5de6 commit 0db985e

File tree

4 files changed

+229
-271
lines changed

4 files changed

+229
-271
lines changed

.github/workflows/testinfra-only.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Testinfra Test Only
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ami_name:
7+
description: 'AMI name to test'
8+
required: true
9+
type: string
10+
11+
env:
12+
AWS_REGION: ap-southeast-1
13+
AWS_DEFAULT_REGION: ap-southeast-1
14+
15+
jobs:
16+
test:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Configure AWS credentials
22+
uses: aws-actions/configure-aws-credentials@v4
23+
with:
24+
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-role
25+
aws-region: ${{ env.AWS_REGION }}
26+
27+
- name: Run tests
28+
timeout-minutes: 10
29+
env:
30+
AMI_NAME: ${{ github.event.inputs.ami_name }}
31+
run: |
32+
# TODO: use poetry for pkg mgmt
33+
pip3 install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest pytest-testinfra[paramiko,docker] requests
34+
pytest -vv -s testinfra/test_ami_nix.py

flake.lock

+15-212
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)