-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
46 lines (41 loc) · 1.03 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
default:
image: python:3.11-slim
stages:
- linters
- tests
Tests:
stage: tests
services:
- name: bitnami/postgresql:latest
alias: cc_postgres
variables:
POSTGRES_USER: shift_cc
POSTGRES_PASSWORD: shift_cc_pass
POSTGRES_DB: shift_cc_db
before_script:
- apt-get update && apt-get install -y curl
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
- poetry install
- apt-get -y update && apt-get -y install libgl1
- apt-get -y update && apt-get -y install libglib2.0-0
script:
- poetry run pytest
rules:
- if: $CI_PIPELINE_SOURCE == "push"
changes:
- "**/*.py"
# when: manual
Linters:
stage: linters
before_script:
- apt-get update && apt-get install -y curl
- curl -sSL https://install.python-poetry.org | python3 -
- export PATH="/root/.local/bin:$PATH"
- poetry install
script:
- poetry run flake8
- poetry run mypy .
rules:
- if: $CI_PIPELINE_SOURCE == "push"
when: manual