1
+ name : ci
2
+ on :
3
+ push :
4
+ branches :
5
+ - master
6
+ pull_request :
7
+ branches :
8
+ - ' **'
9
+ env :
10
+ COVERAGE_OPTION : ./node_modules/.bin/nyc
11
+ NODE_VERSION : 10
12
+ PARSE_SERVER_TEST_TIMEOUT : 20000
13
+ jobs :
14
+ check-mongo :
15
+ strategy :
16
+ matrix :
17
+ include :
18
+ - name : Mongo 4.0.4, ReplicaSet, WiredTiger
19
+ MONGODB_VERSION : 4.0.4
20
+ MONGODB_TOPOLOGY : replicaset
21
+ MONGODB_STORAGE_ENGINE : wiredTiger
22
+ NODE_VERSION : 10
23
+ - name : Mongo 3.6.21
24
+ MONGODB_VERSION : 3.6.21
25
+ NODE_VERSION : 10
26
+ - name : Redis Cache
27
+ PARSE_SERVER_TEST_CACHE : redis
28
+ NODE_VERSION : 10
29
+ - name : Node 12.12.0
30
+ NODE_VERSION : 12.12.0
31
+ name : ${{ matrix.name }}
32
+ timeout-minutes : 30
33
+ runs-on : ubuntu-18.04
34
+ services :
35
+ redis :
36
+ image : redis
37
+ ports :
38
+ - 6379:6379
39
+ env :
40
+ MONGODB_VERSION : ${{ matrix.MONGODB_VERSION }}
41
+ MONGODB_TOPOLOGY : ${{ matrix.MONGODB_TOPOLOGY }}
42
+ MONGODB_STORAGE_ENGINE : ${{ matrix.MONGODB_STORAGE_ENGINE }}
43
+ PARSE_SERVER_TEST_CACHE : ${{ matrix.PARSE_SERVER_TEST_CACHE }}
44
+ NODE_VERSION : ${{ matrix.NODE_VERSION }}
45
+ steps :
46
+ - uses : actions/checkout@v2
47
+ - name : Use Node.js ${{ matrix.NODE_VERSION }}
48
+ uses : actions/setup-node@v1
49
+ with :
50
+ node-version : ${{ matrix.NODE_VERSION }}
51
+ - name : Cache Node.js modules
52
+ uses : actions/cache@v2
53
+ with :
54
+ path : ~/.npm
55
+ key : ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
56
+ restore-keys : |
57
+ ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
58
+ - name : Install dependencies
59
+ run : npm ci
60
+ - if : ${{ matrix.name == 'Mongo 3.6.21' }}
61
+ run : npm run lint
62
+ - run : npm run pretest
63
+ - run : npm run coverage
64
+ env :
65
+ CI : true
66
+ - run : bash <(curl -s https://codecov.io/bash)
67
+ check-postgres :
68
+ name : Postgresql
69
+ timeout-minutes : 30
70
+ runs-on : ubuntu-18.04
71
+ services :
72
+ redis :
73
+ image : redis
74
+ ports :
75
+ - 6379:6379
76
+ postgres :
77
+ image : postgis/postgis:11-3.0
78
+ env :
79
+ POSTGRES_PASSWORD : postgres
80
+ ports :
81
+ - 5432:5432
82
+ options : >-
83
+ --health-cmd pg_isready
84
+ --health-interval 10s
85
+ --health-timeout 5s
86
+ --health-retries 5
87
+ env :
88
+ PARSE_SERVER_TEST_DB : postgres
89
+ POSTGRES_MAJOR_VERSION : 11
90
+ PARSE_SERVER_TEST_DATABASE_URI : postgres://postgres:postgres@localhost:5432/parse_server_postgres_adapter_test_database
91
+ steps :
92
+ - uses : actions/checkout@v2
93
+ - name : Use Node.js 10
94
+ uses : actions/setup-node@v1
95
+ with :
96
+ node-version : 10
97
+ - name : Cache Node.js modules
98
+ uses : actions/cache@v2
99
+ with :
100
+ path : ~/.npm
101
+ key : ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-${{ hashFiles('**/package-lock.json') }}
102
+ restore-keys : |
103
+ ${{ runner.os }}-node-${{ matrix.NODE_VERSION }}-
104
+ - name : Install dependencies
105
+ run : npm ci
106
+ - run : bash scripts/before_script_postgres.sh
107
+ - run : npm run coverage
108
+ env :
109
+ CI : true
110
+ - run : bash <(curl -s https://codecov.io/bash)
0 commit comments