-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathpython-sqlalchemy-integ-tests.yml
More file actions
73 lines (64 loc) · 2.12 KB
/
python-sqlalchemy-integ-tests.yml
File metadata and controls
73 lines (64 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Python SQLAlchemy integration tests
permissions: {}
on:
push:
branches: [ main ]
paths:
- 'python/sqlalchemy/**'
- '.github/workflows/python-sqlalchemy-integ-tests.yml'
pull_request:
branches: [ main ]
paths:
- 'python/sqlalchemy/**'
- '.github/workflows/python-sqlalchemy-integ-tests.yml'
# Give us a button to allow running the workflow on demand for testing.
workflow_dispatch:
inputs:
tags:
description: 'Manual Workflow Run'
required: false
type: string
jobs:
python-sqlalchemy-integ-test:
runs-on: ubuntu-latest
permissions:
id-token: write # required by aws-actions/configure-aws-credentials
concurrency:
# Ensure only 1 job uses the workflow cluster at a time.
group: ${{ github.workflow }}
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Cache pip packages
uses: actions/cache@v5
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.PYTHON_IAM_ROLE }}
aws-region: us-east-1
- name: Configure and run integration for SQL Alchemy
working-directory: ./python/sqlalchemy
env:
CLUSTER_ENDPOINT: ${{ secrets.PYTHON_SQLALCHEMY_CLUSTER_ENDPOINT }}
REGION: ${{ secrets.PYTHON_SQLALCHEMY_CLUSTER_REGION }}
CLUSTER_USER: admin
run: |
python3 -m venv sqlalchemy-integ
source sqlalchemy-integ/bin/activate
wget https://www.amazontrust.com/repository/AmazonRootCA1.pem -O root.pem
pip install --upgrade pip
pip install --force-reinstall -r requirements.txt
python3 -c "import boto3; print(boto3.__version__)"
pip install pytest pytest-cov
pip list
echo "$GITHUB_WORKSPACE" >> $GITHUB_PATH
pytest -v test/