-
Notifications
You must be signed in to change notification settings - Fork 3
75 lines (69 loc) · 1.54 KB
/
anni.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
name: Annotation Interface
on:
push:
paths:
- '.github/workflows/anni.yml'
- 'yarn.lock'
- 'anni/**'
defaults:
run:
working-directory: ./anni
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn lint
test:
name: Test
runs-on: ubuntu-latest
env:
DB_HOST: localhost
DB_PORT: 27017
DB_USER: mongo
DB_PASSWORD: mongo
services:
mongodb:
image: mongo:5.0
env:
MONGO_INITDB_ROOT_USERNAME: ${{ env.DB_USER }}
MONGO_INITDB_ROOT_PASSWORD: ${{ env.DB_PASSWORD }}
options: >-
--health-cmd mongosh
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 27017:27017
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn test
- uses: actions/upload-artifact@v3
with:
name: coverage-report
path: anni/coverage
codecov:
name: Generate Code Coverage Report
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: coverage-report
path: anni/coverage
- uses: codecov/codecov-action@v2
with:
flags: anni
directory: anni/coverage
build:
name: Build
needs: [lint, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: yarn
- run: yarn build