-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
57 lines (53 loc) · 1.17 KB
/
.gitlab-ci.yml
File metadata and controls
57 lines (53 loc) · 1.17 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
stages:
- format
- build
variables:
MASTER_BRANCH: "master"
PYTHON_IMAGE: "python:3.8"
NODE_IMAGE: "node:13.12.0-alpine"
backend format:
stage: format
image: $PYTHON_IMAGE
tags:
- docker
rules:
- if: '$CI_MERGE_REQUEST_ID != null || $CI_COMMIT_BRANCH == $MASTER_BRANCH'
changes:
- server/**/*
when: always
before_script:
- pip install --upgrade pip
- pip install black
script:
- black --check -S --exclude 'server/test' server
backend build:
stage: build
image: $PYTHON_IMAGE
tags:
- docker
rules:
- if: '$CI_MERGE_REQUEST_ID != null || $CI_COMMIT_BRANCH == $MASTER_BRANCH'
changes:
- server/**/*
when: always
before_script:
- pip install --upgrade pip
- pip install -r server/requirements.txt
- pip install pylint
script:
- pylint --errors-only server
frontend build:
stage: build
image: $NODE_IMAGE
tags:
- docker
rules:
- if: '$CI_MERGE_REQUEST_ID != null || $CI_COMMIT_BRANCH == $MASTER_BRANCH'
changes:
- client/**/*
when: always
before_script:
- cd client
- npm install
script:
- CI=false ./node_modules/.bin/eslint src