forked from learningequality/kolibri
-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (74 loc) · 2.68 KB
/
morongo_integration.yml
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
81
82
83
84
85
86
87
88
89
90
name: Morango Integration Tests
on:
schedule:
- cron: '0 0 * * 0'
jobs:
morango_integration_tests_sqlite:
name: Morango Integration Tests
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9, '3.10', '3.11']
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Cache SQLite3
id: cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/test.txt', 'requirements/base.txt', 'requirements/cext.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: |
pip install -r requirements/test.txt --upgrade
pip install -r requirements/base.txt --upgrade
pip install -r requirements/cext.txt --upgrade
- name: Run pre-test script
run: python test/patch_pytest.py
- name: Run tests with SQLite
run: python -O -m pytest kolibri/core/auth/test/test_morango_integration.py
morango_integration_tests_postgres:
name: Morango Integration Tests with PostgreSQL
runs-on: ubuntu-latest
services:
postgres:
image: postgres:latest
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r requirements/test.txt --upgrade
pip install -r requirements/base.txt --upgrade
pip install -r requirements/cext.txt --upgrade
pip install -r requirements/postgres.txt --upgrade
- name: Run pre-test script
run: python test/patch_pytest.py
- name: Run tests with PostgreSQL
env:
KOLIBRI_DATABASE_ENGINE: postgres
KOLIBRI_DATABASE_NAME: test
KOLIBRI_DATABASE_USER: postgres
KOLIBRI_DATABASE_PASSWORD: postgres
KOLIBRI_DATABASE_HOST: localhost
KOLIBRI_DATABASE_PORT: 5432
run: python -O -m pytest kolibri/core/auth/test/test_morango_integration.py