Skip to content

test: push trigger

test: push trigger #1

Workflow file for this run

name: Testinfra Test Only
on:
workflow_dispatch:
inputs:
ami_name:
description: 'AMI name to test'
required: true
type: string
push:
branches:
- sam/build-ami-local
env:
AWS_REGION: ap-southeast-1
AWS_DEFAULT_REGION: ap-southeast-1
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-role
aws-region: ${{ env.AWS_REGION }}
- name: Run tests
timeout-minutes: 10
env:
AMI_NAME: ${{ github.event.inputs.ami_name }}
run: |
# TODO: use poetry for pkg mgmt
pip3 install boto3 boto3-stubs[essential] docker ec2instanceconnectcli pytest pytest-testinfra[paramiko,docker] requests
pytest -vv -s testinfra/test_ami_nix.py