-
Notifications
You must be signed in to change notification settings - Fork 0
142 lines (135 loc) · 3.89 KB
/
helios-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
name: Install, build, lint and tests
on: pull_request
jobs:
package-dedupe:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Check for duplicate dependencies (fix w/ "yarn dedupe")
run: yarn dedupe --check
lint-and-typecheck-typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Install packages
run: yarn --immutable
- name: Run the TS linter
run: yarn lint:typescript
- name: Run the typescript
run: yarn typecheck:typescript
lint-css:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Install packages
run: yarn --immutable
- name: Run the CSS linter
run: yarn lint:scss
tests-typescript:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.7-alpine # Conserver la même version avec le fichier docker-compose.yaml
env:
POSTGRES_DB: helios
POSTGRES_PASSWORD: h3li0s
POSTGRES_PORT: 5432
POSTGRES_USER: helios
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
strategy:
matrix:
side: ['back', 'front']
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Install packages
run: yarn --immutable
- name: Run the tests
env:
DATABASE_URL: postgres://helios:h3li0s@localhost:5433/helios
run: yarn test:typescript:${{ matrix.side }}
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Install packages
env:
YARN_NODE_LINKER: pnp
run: yarn --immutable
- name: Build the app
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
YARN_NODE_LINKER: pnp
run: yarn build
python:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13.7-alpine # Conserver la même version avec le fichier docker-compose.yaml
env:
POSTGRES_DB: helios
POSTGRES_PASSWORD: h3li0s
POSTGRES_PORT: 5432
POSTGRES_USER: helios
ports:
- 5433:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: package.json
- name: Install packages
run: yarn --immutable
- name: Run the migrations
env:
NODE_ENV: test
run: yarn migrations:up
- name: Install pipenv
run: pipx install pipenv
- uses: actions/setup-python@v4
with:
cache: pipenv
python-version: 3.10.8 # Conserver la même version que celle dans Pipfile
- name: Install dependencies
run: pipenv install --dev --deploy
- name: Lint
run: pipenv run lint
- name: Type check
run: pipenv run typecheck
- name: Create the DIAMANT public key
env:
DIAMANT_PRIVATE_KEY: ${{ secrets.DIAMANT_PRIVATE_KEY }}
run: echo "$DIAMANT_PRIVATE_KEY" | gpg --import
- name: Test
run: pipenv run test_coverage