1 |
rakin |
8 |
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node |
2 |
|
|
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions |
3 |
|
|
|
4 |
|
|
name: Build |
5 |
|
|
|
6 |
|
|
on: [ push, pull_request ] |
7 |
|
|
|
8 |
|
|
jobs: |
9 |
|
|
build: |
10 |
|
|
|
11 |
|
|
runs-on: ubuntu-latest |
12 |
|
|
|
13 |
|
|
strategy: |
14 |
|
|
matrix: |
15 |
|
|
node-version: [14.x, 16.x] |
16 |
|
|
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ |
17 |
|
|
|
18 |
|
|
steps: |
19 |
|
|
- uses: actions/checkout@v3 |
20 |
|
|
- name: Use Node.js ${{ matrix.node-version }} |
21 |
|
|
uses: actions/setup-node@v3 |
22 |
|
|
with: |
23 |
|
|
node-version: ${{ matrix.node-version }} |
24 |
rakin |
135 |
|
25 |
rakin |
145 |
- name: "Install Dependencies" |
26 |
rakin |
135 |
- run: npm install |
27 |
rakin |
145 |
|
28 |
|
|
- name: "Install Dev Dependencies" |
29 |
rakin |
134 |
- run: npm install --dev |
30 |
rakin |
145 |
|
31 |
|
|
- name: "Run ESLint" |
32 |
|
|
- run: npm run lint |
33 |
|
|
|
34 |
|
|
- name: "Build" |
35 |
rakin |
52 |
- run: npm run build --if-present |
36 |
rakin |
145 |
|
37 |
|
|
- name: "Run Test Suites" |
38 |
rakin |
8 |
- run: npm run test --if-present |