-
Notifications
You must be signed in to change notification settings - Fork 90
44 lines (34 loc) · 935 Bytes
/
node-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
name: Node.js CI
on:
pull_request:
branches:
- main
jobs:
ci:
name: Lint / Build / Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
fail-fast: false
steps:
- name: Checkout Source Files
uses: actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
- name: Use Node.js v${{ matrix.node-version }}
uses: actions/setup-node@7c12f8017d5436eb855f1ed4399f037a36fbd9e8 # v2
with:
node-version: ${{ matrix.node-version }}
- name: Install Dependencies
run: npm ci
- name: Lint Files
run: npm run lint
- name: Create .env File For CI Builds
run: cp sample.env .env
- name: Start Projects
run: |
npm run build -- --no-cache
npm start
- name: Sleep For 30 Seconds
run: sleep 30
- name: Run Tests
run: npm run test