-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (71 loc) · 2.06 KB
/
Copy pathci.yml
File metadata and controls
80 lines (71 loc) · 2.06 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
74
75
76
77
78
79
80
name: CI
on:
push:
pull_request:
jobs:
unit:
name: Unit Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[aws,gcp,azure,vault,dev]"
- name: Run unit tests
run: pytest -m "not integration" -v
integration:
name: Integration Tests
runs-on: ubuntu-latest
services:
localstack:
image: localstack/localstack:3
ports:
- 4566:4566
env:
SERVICES: kms
options: >-
--health-cmd "curl -sf http://localhost:4566/_localstack/health"
--health-interval 10s
--health-timeout 5s
--health-retries 15
vault:
image: hashicorp/vault:latest
ports:
- 8200:8200
env:
VAULT_DEV_ROOT_TOKEN_ID: root
VAULT_DEV_LISTEN_ADDRESS: 0.0.0.0:8200
SKIP_SETCAP: "true"
VAULT_ADDR: http://127.0.0.1:8200
options: >-
--health-cmd "vault status"
--health-interval 10s
--health-timeout 5s
--health-retries 15
steps:
- uses: actions/checkout@v6
- name: Set up Python 3.12
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[aws,gcp,azure,vault,dev]"
- name: Run integration tests
run: pytest -m integration -v
env:
AWS_ACCESS_KEY_ID: test
AWS_SECRET_ACCESS_KEY: test
AWS_DEFAULT_REGION: us-east-1
AWS_ENDPOINT_URL: http://localhost:4566
VAULT_ADDR: http://localhost:8200
VAULT_TOKEN: root