Skip to content

Instantly share code, notes, and snippets.

@brysontyrrell
Created February 16, 2022 19:47
Show Gist options
  • Save brysontyrrell/25d66ba0d4ea81b15bfdc2f4348ed51f to your computer and use it in GitHub Desktop.
Save brysontyrrell/25d66ba0d4ea81b15bfdc2f4348ed51f to your computer and use it in GitHub Desktop.
name: Automated Unit Tests
on: [pull_request]
jobs:
automated-unit-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: us-east-2 # change to appropriate region
role-to-assume: arn:aws:iam::111122223333:role/my-repo-iam-role
role-session-name: my_repo
role-duration-seconds: 900
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install Dependencies
run: |
aws codeartifact login --tool pip --domain my_domain --repository my_repo &&
pip install -r requirements.txt
- name: Run Tests
run: pytest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment