-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (49 loc) · 1.99 KB
/
nodejs.yml
File metadata and controls
55 lines (49 loc) · 1.99 KB
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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Node.js CI
on:
push:
branches: [ develop ]
pull_request:
branches: [ develop ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
mongodb-version: [4.2]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB v${{ matrix.mongodb-version }}
uses: supercharge/mongodb-github-action@1.2.0
with:
mongodb-version: ${{ matrix.mongodb-version }}
- run: npm ci
- run: npm install
- run: npm run prettier:check --if-present
- run: npm run lint --if-present
- run: npm test --if-present
env:
TEST_DATABASE_URL: ${{ secrets.TEST_DATABASE_URL }}
CLIENT_ID: ${{ secrets.CLIENT_ID }}
ACCESS_SECRET_KEY: ${{ secrets.ACCESS_SECRET_KEY }}
ACCESS_SECRET_TIME: ${{ secrets.ACCESS_SECRET_TIME }}
REFRESH_SECRET_KEY: ${{ secrets.REFRESH_SECRET_KEY }}
REFRESH_SECRET_TIME: ${{ secrets.REFRESH_SECRET_TIME }}
EMAILVERIFICATION_SECRET_KEY: ${{ secrets.EMAILVERIFICATION_SECRET_KEY }}
EMAILVERIFICATION_SECRET_TIME: ${{ secrets.EMAILVERIFICATION_SECRET_TIME }}
FACEBOOK_APP_ID: ${{ secrets.FACEBOOK_APP_ID }}
FACEBOOK_APP_SECRET: ${{ secrets.FACEBOOK_APP_SECRET }}
FACEBOOK_APP_URL: ${{ secrets.FACEBOOK_APP_URL }}
MAIL: ${{ secrets.MAIL }}
MAILPASS: ${{ secrets.MAILPASS }}
- run: TOKEN=${{ secrets.CODECOV_TOKEN }} npm run test:jest:codecov --if-present
- run: npm run test-coverage --if-present
- run: PORT=${{ secrets.CODECOV_TOKEN }} npm run codecov --if-present
env:
CI: true