-
Notifications
You must be signed in to change notification settings - Fork 4
70 lines (56 loc) · 1.76 KB
/
ci.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
name: Development CI
on:
push:
branches: [ dev, develop, development ]
pull_request:
branches: [ main, master, dev, develop, development ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x, 16.x, 18.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y libssl3
- name: Configure MongoDB Memory Server
run: |
echo "MONGOMS_VERSION=4.0.3" >> $GITHUB_ENV
echo "MONGOMS_DOWNLOAD_URL=https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-ubuntu1804-4.0.3.tgz" >> $GITHUB_ENV
- name: Install dependencies
run: |
npm install
npm install [email protected] --save-dev
- name: Run linter
run: npm run lint
- name: Run tests
run: npm test
env:
PARSE_MASTER_KEY: 'test-master-key'
PARSE_APP_ID: 'test-app-id'
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Install dependencies
run: npm ci
- name: Build package
run: npm pack
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: package
path: "*.tgz"