-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (55 loc) · 2.33 KB
/
integration_tests.yaml
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
name: Integration Tests
on:
push:
branches: [ '*' ]#[ main, 'release-*' ]
env:
COSMOS_CONFIG_PATH: "./config/integration-tests-cosmos-store.yaml"
IN_MEM_CONFIG_PATH: "./config/integration-tests-memory-store.yaml"
PG_CONFIG_PATH: "./config/integration-tests-pg-store.yaml"
jobs:
ci:
strategy:
fail-fast: false
matrix:
python-version: [ "3.9" ]
os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Run Poetry image
uses: abatilo/[email protected]
with:
poetry-version: 1.1.13
- name: Install dependencies
run: poetry install
- name: In-Memory Integration Test Setup
run: export CONFIG_PATH=$IN_MEM_CONFIG_PATH
- name: In-Memory Integration Test
run: poetry run pytest tests/integration -p no:warnings --verbose --asyncio-mode=strict
- name: Clean up In-Memory Integration Test
run: poetry run tests/integration/scripts/cleanup.py
- name: Cosmos DB Integration Test Setup
run: |
export STORE_COSMOS_ACCOUNT_URI="${{ secrets.COSMOS_ACCOUNT_URI }}"
export STORE_COSMOS_ACCOUNT_KEY="${{ secrets.COSMOS_ACCOUNT_KEY }}"
export CONFIG_PATH=$COSMOS_CONFIG_PATH
export STORE_COSMOS_DB_NAME=scim_int_tsts_$(date +%s)
- name: Cosmos DB Integration Test
run: poetry run pytest tests/integration -p no:warnings --verbose --asyncio-mode=strict
- name: Clean up Cosmos DB Integration Test
run: poetry run tests/integration/scripts/cleanup.py
- name: PostgreSQL Integration Test Setup
run: |
export STORE_PG_HOST="${{ secrets.STORE_PG_HOST }}"
export STORE_PG_USERNAME="${{ secrets.STORE_PG_USERNAME }}"
export STORE_PG_PASSWORD="${{ secrets.STORE_PG_PASSWORD }}"
export STORE_PG_DATABASE="${{ secrets.STORE_PG_DATABASE }}"
export STORE_PG_SCHEMA=int_tst_$(date +%s)
export CONFIG_PATH=$PG_CONFIG_PATH
- name: PostgreSQL Integration Test
run: poetry run pytest tests/integration -p no:warnings --verbose --asyncio-mode=strict
- name: Clean up PostgreSQL Integration Test
run: poetry run tests/integration/scripts/cleanup.py