-
Notifications
You must be signed in to change notification settings - Fork 21
50 lines (48 loc) · 1.38 KB
/
server-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
name: Server CI
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: checkout
uses: actions/checkout@v2
- name: Use node ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: cache npm modules
uses: actions/cache@v1
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: npm ci
working-directory: unfollow-ninja-server
run: npm ci
- name: lint
working-directory: unfollow-ninja-server
run: npm run lint
- name: build
working-directory: unfollow-ninja-server
run: npm run build
- name: test
working-directory: unfollow-ninja-server
run: npm run specs
docker:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: create an empty env file
working-directory: unfollow-ninja-server
run: touch .env
- name: build
working-directory: unfollow-ninja-server/tests
run: docker-compose build
- name: run tests
working-directory: unfollow-ninja-server/tests
run: docker-compose up --exit-code-from tests