-
Notifications
You must be signed in to change notification settings - Fork 18
55 lines (44 loc) · 1.65 KB
/
test-pull-request.yaml
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
# The following workflow will run when a pull request is opened, synced or reopened
# It's intent is to run a build of the package against the PR to ensure that it passes a code build check
name: test-build
on: pull_request
jobs:
# This job will checkout the repo, install dependencies and then build the frontend package
test-build-frontend-and-lib:
runs-on: ubuntu-latest
# set out working directory
defaults:
run:
working-directory: ./
# checkout, install node and run our npm commands to check code builds
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: "16.x"
# install deps for Library and build for development
- name: Install and build library for development
working-directory: ./library
run: |
npm ci
npm run build-dev
# install deps for Library and build for production
- name: Install and build library for production
working-directory: ./library
run: |
npm ci
npm run build-prod
# install deps for Frontend and Library and build both for development
- name: Install and build library and Frontend for development
working-directory: ./examples/typescript
run: |
npm ci
npm run build-all-dev
# install deps for Frontend and Library for and build both for production
- name: Install and build library and Frontend for production
working-directory: ./examples/typescript
run: |
npm ci
npm run build-all-prod