-
Notifications
You must be signed in to change notification settings - Fork 1
54 lines (47 loc) · 1.14 KB
/
checkin.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
name: lint-and-unit-test
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test-job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Use Node.js 10.x"
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Install dependencies
run: yarn install
- name: Test code format
run: yarn lint
- name: prepare docker
uses: hoverkraft-tech/[email protected]
with:
compose-file: ./docker-compose.yml
services: |
mongo
env:
INDEXER_MODE: dmhy
DB_MODE: localhost
DB_PORT: 27017
DB_USER: admin
DB_NAME: dmhy_indexer
DB_PASS: 123456
- name: Unit test and code covergae
run: |
export INDEXER_MODE=dmhy
export DB_MODE=localhost
export DB_PORT=27017
export DB_USER=admin
export DB_NAME=dmhy_indexer
export DB_PASS=123456
npm run check-coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{secrets.CODECOV_TOKEN}}