-
Notifications
You must be signed in to change notification settings - Fork 2
153 lines (152 loc) · 6.01 KB
/
nodejstests.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: nodejstests
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
nodejs-testing:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
java-version: ['21', '22']
node-version: ['20.x', '22.x']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
with:
repository: 'ShiftLeftSecurity/shiftleft-java-example'
path: 'repotests/shiftleft-java-example'
- uses: actions/checkout@v4
with:
repository: 'juice-shop/juice-shop'
path: 'repotests/juice-shop'
- uses: actions/checkout@v4
with:
repository: 'ShiftLeftSecurity/shiftleft-ts-example'
path: 'repotests/shiftleft-ts-example'
- uses: actions/checkout@v4
with:
repository: 'libexpat/libexpat'
path: 'repotests/libexpat'
- uses: actions/checkout@v4
with:
repository: 'HooliCorp/DjanGoat'
path: 'repotests/DjanGoat'
- uses: coursier/cache-action@v6
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- uses: sbt/setup-sbt@v1
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "8.3"
tools: composer:v2
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install sbt
run: brew install sbt
if: runner.os == 'macOS'
- name: Install ubuntu packages
run: |
sudo apt update -y
sudo apt install -y zlib1g php-zip
if: runner.os == 'Linux'
- run: |
sbt stage createDistribution
cd wrapper/nodejs
bash build.sh
sudo npm install -g .
curl -L https://github.com/joernio/astgen/releases/latest/download/astgen-linux -o /usr/local/bin/astgen
chmod +x /usr/local/bin/astgen
atom -l java --remove-atom -o $GITHUB_WORKSPACE/repotests/shiftleft-java-example/app.atom $GITHUB_WORKSPACE/repotests/shiftleft-java-example
atom -l js --remove-atom -o $GITHUB_WORKSPACE/repotests/juice-shop/app.atom $GITHUB_WORKSPACE/repotests/juice-shop
atom -l js --remove-atom -o $GITHUB_WORKSPACE/repotests/shiftleft-ts-example/app.atom $GITHUB_WORKSPACE/repotests/shiftleft-ts-example
atom -l python --remove-atom -o $GITHUB_WORKSPACE/repotests/DjanGoat/app.atom $GITHUB_WORKSPACE/repotests/DjanGoat
atom parsedeps -l python --remove-atom -o $GITHUB_WORKSPACE/repotests/DjanGoat/app.atom $GITHUB_WORKSPACE/repotests/DjanGoat
atom -l c --remove-atom -o $GITHUB_WORKSPACE/repotests/libexpat/app.atom $GITHUB_WORKSPACE/repotests/libexpat
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
nodejs-testing-windows:
runs-on: windows-latest
strategy:
matrix:
java-version: ['21', '22']
node-version: ['22.x']
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- uses: actions/checkout@v4
with:
repository: 'ShiftLeftSecurity/shiftleft-java-example'
path: 'repotests/shiftleft-java-example'
- uses: actions/checkout@v4
with:
repository: 'juice-shop/juice-shop'
path: 'repotests/juice-shop'
- uses: actions/checkout@v4
with:
repository: 'ShiftLeftSecurity/shiftleft-ts-example'
path: 'repotests/shiftleft-ts-example'
- uses: actions/checkout@v4
with:
repository: 'libexpat/libexpat'
path: 'repotests/libexpat'
- uses: actions/checkout@v4
with:
repository: 'HooliCorp/DjanGoat'
path: 'repotests/DjanGoat'
- uses: coursier/cache-action@v6
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java-version }}
- uses: sbt/setup-sbt@v1
- name: build
shell: pwsh
run: |
sbt stage createDistribution
cd wrapper\\nodejs
copy ..\..\target\atom.zip plugins\
Expand-Archive -Path ..\..\target\atom.zip -DestinationPath plugins\ -Force
Remove-Item -Force plugins\atom.zip
php --php-ini php.ini composer.phar require nikic/php-parser:4.18.0 --ignore-platform-reqs --optimize-autoloader
npm install
npm install -g .
get-command atom
get-command astgen
get-command phpastgen
astgen --version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: test
shell: pwsh
run: |
atom -l java --remove-atom -o $env:GITHUB_WORKSPACE\\repotests\\shiftleft-java-example\\app.atom $env:GITHUB_WORKSPACE\\repotests\\shiftleft-java-example
atom -l python --remove-atom -o $env:GITHUB_WORKSPACE\\repotests\\DjanGoat\\app.atom $env:GITHUB_WORKSPACE\\repotests\\DjanGoat
atom parsedeps --remove-atom -l python -o $env:GITHUB_WORKSPACE\\repotests\\DjanGoat\\app.atom $env:GITHUB_WORKSPACE\\repotests\\DjanGoat
atom -l c -o $env:GITHUB_WORKSPACE\\repotests\\libexpat\\app.atom $env:GITHUB_WORKSPACE\\repotests\\libexpat
- name: test2
shell: cmd
run: |
atom -l js --remove-atom -o %GITHUB_WORKSPACE%\\repotests\\juice-shop\\app.atom %GITHUB_WORKSPACE%\\repotests\\juice-shop
- name: test3
shell: cmd
run: |
atom -l js --remove-atom -o %GITHUB_WORKSPACE%\\repotests\\shiftleft-ts-example\\app.atom %GITHUB_WORKSPACE%\\repotests\\shiftleft-ts-example