-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 2.06 KB
/
Copy pathTest-Unit.yml
File metadata and controls
66 lines (53 loc) · 2.06 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
61
62
63
64
65
66
# Display Name of the workflow
name: Dynamic Analysis - Unit Test
# When this workflow triggers
on:
# Run the unit tests on every change
push:
branches: [main]
pull_request:
branches: [main]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allows you to run this workflow from other workflows as a library/unit of reusable code
workflow_call:
# Define each session of execution that should be executed
jobs:
Test:
# Display name of the job
name: Code Unit Test
# Operating system filter for the runners
runs-on: ubuntu-latest
# Sets the scopes available to the github_token injected to the GH Actions runner
permissions:
contents: read
# Set of execution steps to perform
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- name: Download Source Code
uses: actions/checkout@v7
background: true
# Set up NodeJS on the build host
- name: Set up the Node.JS Runtime
uses: actions/setup-node@v6
background: true
with:
node-version: 24
# Set up the socket firewall binary
- name: Install - Socket Firewall
uses: SocketDev/action@ba6de6cc0565af1f42295590380973573297e31f
background: true
with:
mode: firewall-free
# Bring job back to sync execution by awaiting for all async jobs to finish before continuing
- name: Steps - Convert Back To Synchronous Execution - Environment Setup
wait-all: true
# Install all of the dependencies
- name: Clean Install of the Project Dependencies
run: sfw npm ci
# Compile the Typescript files to JS
- name: Build Project
run: npm run build:Dev
# Run all the existing unit tests
- name: Run the Unit Tests
run: npm run test:Unit