Skip to content

Commit 182dcc1

Browse files
urrskurfeex
andauthored
Add an action to build and run the frontend unit tests (#8)
Co-authored-by: Felix Exner <[email protected]>
1 parent a39544c commit 182dcc1

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build and Test
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- master
8+
push:
9+
branches:
10+
- master
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: '18'
24+
25+
- name: Set up Chrome for Karma tests
26+
uses: browser-actions/setup-chrome@v1
27+
28+
- name: Configure npm registry
29+
run: |
30+
npm config set @universal-robots:registry https://pkgs.dev.azure.com/polyscopex/api/_packaging/polyscopex/npm/registry/
31+
npm config set strict-ssl false
32+
33+
- name: Install dependencies
34+
run: npm install
35+
36+
- name: Build project
37+
run: npm run build
38+
39+
- name: Run frontend tests
40+
working-directory: external-control-frontend
41+
run: npm run test
42+
43+
- name: Upload build artifacts
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: external-control-urcapx
47+
path: target/external-control-*.urcapx
48+
if-no-files-found: error

0 commit comments

Comments
 (0)