46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
name: Execute tests against AWS
|
|
on:
|
|
schedule:
|
|
- cron: '00 6 * * 0'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Get pip cache dir
|
|
id: pip-cache
|
|
run: |
|
|
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT
|
|
- name: pip cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
|
key: pip-3.11-${{ hashFiles('**/setup.cfg') }}
|
|
- name: Update pip
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
- name: Install project dependencies
|
|
run: |
|
|
pip install -r requirements-dev.txt
|
|
- name: Configure AWS
|
|
uses: aws-actions/configure-aws-credentials@v4
|
|
with:
|
|
aws-region: us-east-1
|
|
role-to-assume: arn:aws:iam::682283128318:role/GithubActionsRole
|
|
- name: Test with pytest
|
|
env:
|
|
MOTO_TEST_ALLOW_AWS_REQUEST: ${{ true }}
|
|
run: |
|
|
pytest -sv tests/test_ec2/ tests/test_ses/ tests/test_s3 -m aws_verified
|