-
-
Notifications
You must be signed in to change notification settings - Fork 142
123 lines (112 loc) · 3.7 KB
/
test.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
name: Test
on:
push:
branches:
- master
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10, 12]
env:
SETTINGS_AWS_ACCESS_KEY_ID: ${{ secrets.SETTINGS_AWS_ACCESS_KEY_ID }}
SETTINGS_AWS_SECRET_ACCESS_KEY: ${{ secrets.SETTINGS_AWS_SECRET_ACCESS_KEY }}
NODE_VERSION: ${{ matrix.node-version }}
services:
mysql:
image: mysql:5.7.10
ports:
# Another version of MySQL is installed on the vm and already uses the port 3306.
- 3308:3306
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
mariadb:
image: mariadb:10.3.22
ports:
- 3307:3306
env:
MYSQL_ROOT_PASSWORD: admin
MYSQL_USER: test
MYSQL_PASSWORD: test
MYSQL_DATABASE: test
postgres:
image: postgres:9.6.1
ports:
- 5432:5432
env:
POSTGRES_USER: test
POSTGRES_PASSWORD: test
POSTGRES_DB: test
mongodb:
image: mongo:3.4.1
ports:
- 27017:27017
redis:
image: redis:4.0.14
ports:
- 6379:6379
steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install global dependencies (lerna, pm2, codecov)
run: npm install -g lerna pm2 codecov
- name: Install project dependencies
run: npm install
- name: Install package dependencies and build packages
run: lerna bootstrap
- name: Create CLI symlink in the global folder
run: npm link
working-directory: packages/cli
- name: Check package linting
run: npm run lint
- name: Run unit tests of @foal/acceptance-tests
run: cd packages/acceptance-tests && npm run test
- name: Run unit tests of @foal/aws-s3
run: cd packages/aws-s3 && npm run test
- name: Run unit tests of @foal/cli
run: cd packages/cli && npm run test
- name: Run unit tests of @foal/ejs
run: cd packages/ejs && npm run test
- name: Run unit tests of @foal/examples
run: cd packages/examples && npm run test
- name: Run unit tests of @foal/formidable
run: cd packages/formidable && npm run test
- name: Run unit tests of @foal/graphql
run: cd packages/graphql && npm run test
- name: Run unit tests of @foal/jwks-rsa
run: cd packages/jwks-rsa && npm run test
- name: Run unit tests of @foal/jwt
run: cd packages/jwt && npm run test
- name: Run unit tests of @foal/mongodb
run: cd packages/mongodb && npm run test
- name: Run unit tests of @foal/password
run: cd packages/password && npm run test
- name: Run unit tests of @foal/redis
run: cd packages/redis && npm run test
- name: Run unit tests of @foal/social
run: cd packages/social && npm run test
- name: Run unit tests of @foal/storage
run: cd packages/storage && npm run test
- name: Run unit tests of @foal/swagger
run: cd packages/swagger && npm run test
- name: Run unit tests of @foal/typeorm
run: cd packages/typeorm && npm run test
- name: Run unit tests of @foal/typestack
run: cd packages/typestack && npm run test
- name: Run unit tests of @foal/core
run: cd packages/core && npm run test
- name: Run acceptance tests (Bash)
run: ./e2e_test.sh
- name: Send code coverage report to Codecov
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
file: packages/core/coverage/*.json