Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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