-
Notifications
You must be signed in to change notification settings - Fork 21
49 lines (46 loc) · 1.16 KB
/
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
name: CI
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-24.04
strategy:
matrix:
node: ['18.13.0', '20.9.0']
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Install dependencies
run: npm ci
- name: ESLint
run: npm run lint
- name: Prettier
run: npm run prettier:check
- name: Test
run: npm run test
- name: Copy .env
run: cp .env.dist .env
- name: Build the docker-compose stack
run: docker compose up -d --build postgres
- name: Check running containers
run: docker ps -a
- name: E2E
run: npm run test:e2e
- name: Build
run: npm run build