-
Notifications
You must be signed in to change notification settings - Fork 171
93 lines (81 loc) · 2.81 KB
/
test.yml
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
name: Run Tests
on:
push:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
license_check:
name: License Compliance Check
runs-on: ubuntu-latest
# Service containers to run with `container-job`
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm install
- name: Run License Checks
run: |
npm run licenses
fluidAttacksScan:
name: Fluid Attacks SAST Scan
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the
# added or changed files to the repository.
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
# Ensure that Node.js is available
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 20
- name: Fluid-Attacks scan
continue-on-error: true
uses: docker://ghcr.io/fluidattacks/makes/amd64
with:
args: m gitlab:fluidattacks/universe@trunk /skims scan ./fascan.yml
- name: Show Scan Results
run: |
cat Fluid-Attacks-Results.csv
node -e 'require("fs").readFileSync("Fluid-Attacks-Results.csv","utf-8").indexOf("No vulnerabilities were found in your targets")<0 && process.exit(1)'
test:
name: Test Suite
strategy:
matrix:
node: [18.x, 20.x]
os: [ubuntu-20.04]
runs-on: ${{ matrix.os }}
# Service containers to run with `container-job`
services:
# Label used to access the service container
redis:
# Docker Hub image
image: redis
# Set health checks to wait until redis has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: npm install
- name: Run tests
run: |
npm test
env:
EENGINE_REDIS: redis://127.0.0.1:6379/1