-
Notifications
You must be signed in to change notification settings - Fork 12
/
.gitlab-ci.yml
147 lines (137 loc) · 5.29 KB
/
.gitlab-ci.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
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
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
stages:
- test
- deploy
sqlite3:
stage: test
image: python:3.10
script:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- python -m readme_renderer README.rst >/dev/null
- python -Wd -m coverage run --branch --source=taguette tests.py -v
- coverage html
- coverage report | tail -n 1 | grep -o '\([0-9]\+\(\.[0-9]\+\)\?%\)$'
- flake8 --ignore=W503,W504 tests.py taguette
- "! find taguette -name '*.py' -exec grep --color 'raise \\(validate\\.\\)\\?InvalidFormat([^_]' {} +"
artifacts:
paths:
- htmlcov
sqlite3_valkey:
stage: test
image: python:3.10
services:
- name: valkey/valkey:latest
alias: valkey
script:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- TAGUETTE_TEST_REDIS=redis://valkey:6379 python -Wd tests.py -v
frontend_firefox:
stage: test
image: python:3.10
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yy xvfb firefox-esr
- curl -Lo /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v0.30.0/geckodriver-v0.30.0-linux64.tar.gz
- tar -zxf /tmp/geckodriver.tar.gz -C /usr/local/bin geckodriver
- chmod +x /usr/local/bin/geckodriver
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- TAGUETTE_TEST_WEBDRIVER=firefox xvfb-run python tests.py -v TestSeleniumMultiuser
frontend_chromium_valkey:
stage: test
image: python:3.10
services:
- name: valkey/valkey:latest
alias: valkey
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yy xvfb chromium-driver
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- TAGUETTE_TEST_WEBDRIVER=chromium TAGUETTE_TEST_REDIS=redis://valkey:6379 xvfb-run python tests.py -v TestSeleniumMultiuser
frontend_chromium_subdir:
stage: test
image: python:3.10
script:
- apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -yy xvfb chromium-driver
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- TAGUETTE_TEST_WEBDRIVER=chromium TAGUETTE_TEST_BASE_PATH=/base/path xvfb-run python tests.py -v TestSeleniumMultiuser
sqlite3_latest:
stage: test
image: python:3.12
script:
- pip --disable-pip-version-check --no-cache-dir install --upgrade setuptools
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- rm poetry.lock
- sed -i 's/^python = ".*$/python = "^3.11"/' pyproject.toml
- cat pyproject.toml
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- python -Wd tests.py -v
sqlite3_latest_pip:
stage: test
image: python:3.10
script:
- curl -sSL https://install.python-poetry.org | python3 -
- pip --disable-pip-version-check --no-cache-dir install --upgrade pip
- pip --disable-pip-version-check --no-cache-dir install "babel<3"
- scripts/update_translations.sh
- $HOME/.local/bin/poetry build
- rm -rf taguette
- pip --disable-pip-version-check --no-cache-dir install --upgrade dist/taguette-*.whl bcrypt "aiohttp>=3.4,<4"
- python -Wd tests.py -v
postgres:
stage: test
image: python:3.10
services:
- postgres:latest
variables:
POSTGRES_USER: taguette
POSTGRES_PASSWORD: taguette
TAGUETTE_TEST_DB: postgresql://taguette:taguette@postgres/taguette
script:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction -E postgres
- scripts/update_translations.sh
- python -Wd tests.py -v
mariadb:
stage: test
image: python:3.10
services:
- mariadb:latest
variables:
MYSQL_DATABASE: taguette
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: taguette
MYSQL_PASSWORD: taguette
TAGUETTE_TEST_DB: mysql+pymysql://taguette:taguette@mariadb/taguette
script:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- $HOME/.local/bin/poetry install --no-interaction -E mysql
- scripts/update_translations.sh
- python -Wd tests.py -v
sqlite3_pypy:
stage: test
image: pypy:latest
script:
- curl -sSL https://install.python-poetry.org | python3 -
- $HOME/.local/bin/poetry config virtualenvs.create false
- pypy3 -m venv /tmp/venv
- . /tmp/venv/bin/activate
- pip --disable-pip-version-check --no-cache-dir install --upgrade pip
- $HOME/.local/bin/poetry install --no-interaction
- scripts/update_translations.sh
- python -Wd tests.py -v