Skip to content

Commit cc36173

Browse files
authored
Merge pull request #1533 from soujava/dearrudam-patch-1
Create build-test.yml
2 parents 3b22539 + 842185a commit cc36173

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# 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 and Test
5+
6+
on:
7+
push:
8+
branches: [ "master" ]
9+
pull_request:
10+
branches: [ "master" ]
11+
12+
jobs:
13+
build:
14+
15+
name: Build & Test
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
node-version: [16.x]
21+
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
22+
23+
steps:
24+
- uses: actions/checkout@v3
25+
26+
- name: Cache node modules
27+
uses: actions/cache@v1
28+
with:
29+
path: ~/.npm
30+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
31+
restore-keys: |
32+
${{ runner.os }}-node-
33+
34+
- name: Setup Node.js ${{ matrix.node-version }}
35+
uses: actions/setup-node@v3
36+
with:
37+
node-version: ${{ matrix.node-version }}
38+
cache: 'npm'
39+
- name: Install Dependencies
40+
run: npm install
41+
42+
- name: Clean Distribution Directory
43+
run: npm run ci:clean
44+
45+
- name: Build Application
46+
run: npm run ci:build
47+
48+
- name: Run Unit Tests
49+
run: npm run ci:test
50+
51+
- name: List Files in Distribution Directory
52+
run: ls -R ./dist

0 commit comments

Comments
 (0)