-
Notifications
You must be signed in to change notification settings - Fork 11
63 lines (51 loc) · 1.29 KB
/
test-api.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
name: API pipeline
on:
push:
paths:
- "packages/api/**"
- "packages/shared/**"
env:
CI: true
SECRET_KEY: super-secret-key-readerfront-api
GRAPHQL_IDE: true
DB_USER: USER
DB_PASS: PASS
DB_NAME: DBNAME
DB_HOSTNAME: 127.0.0.1
DB_DIALECT: mysql
APP_URL: http://localhost:3000/
API_URL: http://localhost:8000/
REACT_APP_APP_TITLE: Reader Front
SENDGRID_API: YOUR_API_KEY
EMAIL: YOUR_EMAIL
jobs:
run:
name: Node 14
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "14"
- name: Cache node modules
uses: actions/cache@v2
with:
path: |
node_modules
*/*/node_modules
${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- run: node --version
- run: yarn --version
- name: Install npm dependencies
run: yarn install
- run: yarn build:shared
- run: yarn build:ui
- name: Run lint
run: yarn lint:api
- name: Run build
run: yarn build:api
- name: Run tests
run: yarn test:api -- --maxWorkers=2