-
Notifications
You must be signed in to change notification settings - Fork 924
131 lines (119 loc) · 4.12 KB
/
morango_integration.yml
File metadata and controls
131 lines (119 loc) · 4.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
name: Morango Integration Tests
on:
schedule:
- cron: '0 0 * * 0'
pull_request:
branches:
- develop
- release-*
jobs:
pre_job:
name: Path match check
runs-on: ubuntu-latest
# Map a step output to a job output
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
github_token: ${{ github.token }}
paths: '["requirements/base.txt", ".github/workflows/morango_integration.yml", "kolibri/core/auth/**/*.py"]'
morango_integration_tests_sqlite:
name: Morango Integration Tests for currently supported Python versions
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
env:
INTEGRATION_TEST: 'true'
strategy:
matrix:
python-version: [3.9, '3.10', '3.11', '3.12', '3.13']
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install "tox<4"
- name: tox env cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
- name: Test with tox
run: tox -e py${{ matrix.python-version }} -- kolibri/core/auth/test/test_morango_integration.py
morango_integration_tests_sqlite_eol_python:
name: Morango Integration Tests for EOL Python versions
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
env:
INTEGRATION_TEST: 'true'
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
container:
image: python:${{ matrix.python-version }}-buster
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install "tox<4"
- name: tox env cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }}
key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }}
- name: Test with tox
run: tox -e py${{ matrix.python-version }} -- kolibri/core/auth/test/test_morango_integration.py
morango_integration_tests_postgres:
name: Morango Integration Tests with PostgreSQL
needs: pre_job
if: needs.pre_job.outputs.should_skip != 'true'
runs-on: ubuntu-latest
env:
INTEGRATION_TEST: 'true'
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres:12
# Provide the password for postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Set up Python 3.9 for Postgres
uses: actions/setup-python@v6
with:
python-version: 3.9
- name: Install tox
run: |
python -m pip install --upgrade pip
pip install "tox<4"
- name: tox env cache
uses: actions/cache@v5
with:
path: ${{ github.workspace }}/.tox/py3.9
key: ${{ runner.os }}-tox-py3.9-${{ hashFiles('requirements/*.txt') }}
- name: Test with tox
run: tox -e postgres -- kolibri/core/auth/test/test_morango_integration.py