-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (45 loc) · 1.43 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
---
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 10
strategy:
fail-fast: true
max-parallel: 3
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Update npm to the latest version
run: npm install -g npm@next-9
- name: Install packages that are used in this pipeline
run: npm install --global ajv-cli wait-on
- run: npm install
- uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}
- run: npm run lint
- name: Validate settings
run: |
npx ajv -d src/settings/example.json -s src/settings/settings.schema.json
npx ajv -d src/settings/test.json -s src/settings/settings.schema.json
- run: mv src/settings/test.json src/settings/production.json
- run: npm run build
- run: npm start & npx wait-on tcp:3001
docker:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Docker Build
run: |
cp src/settings/example.json src/settings/production.json
docker build -t lisa-image .