-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (40 loc) · 1.1 KB
/
main.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
name: Build and Test
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-24.04]
node-version: [20.x]
mongodb-version: ['7.0']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb-version }}
- name: npm install
run: npm i
- name: Setup CI config
run: |
echo $CI_CONFIG > config/serviceAccountKey.json
shell: bash
env:
CI_CONFIG: ${{ secrets.SERVICE_ACCOUNT_CI }}
- name: Run tests and collect coverage
run: |
npm run test
env:
CI: true
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}