-
Notifications
You must be signed in to change notification settings - Fork 5
60 lines (52 loc) · 1.47 KB
/
angular.yml
File metadata and controls
60 lines (52 loc) · 1.47 KB
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
56
57
58
59
60
name: TypeScript Lint and Angular App
on:
push:
paths:
- 'Interface/**'
- '.github/workflows/angular.yml'
workflow_dispatch:
jobs:
lint:
runs-on: ubuntu-latest
name: Lint
timeout-minutes: 10
steps:
# Checkout code
- name: Checkout code
uses: actions/checkout@v3
# Cache Node.js modules
- name: Cache Node.js modules
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
# Set up Node.js
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '18.19'
# Install dependencies
- name: Install dependencies
run: npm install
working-directory: 'Interface'
# Lint TypeScript code
- name: Run linting
run: npm run lint
working-directory: 'Interface'
# install fontawesome code
- name: install fontawesome
run: npm install @fortawesome/fontawesome-free
working-directory: 'Interface'
# Build the Angular app
- name: Build Angular app
working-directory: 'Interface'
run: npm run build --if-present
# Test the Angular app
- name: Test Angular app
working-directory: 'Interface'
env:
CI: true
DEBUG: karma*
run: npm run test -- --browsers=ChromeHeadless --watch=false