Feature/updates 2411 #148
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: nodejstests | |
on: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
nodejs-testing: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
java-version: ['17', '19', '20', '21'] | |
node-version: ['20.x'] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ShiftLeftSecurity/shiftleft-java-example' | |
path: 'repotests/shiftleft-java-example' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'juice-shop/juice-shop' | |
path: 'repotests/juice-shop' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ShiftLeftSecurity/shiftleft-ts-example' | |
path: 'repotests/shiftleft-ts-example' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'libexpat/libexpat' | |
path: 'repotests/libexpat' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'HooliCorp/DjanGoat' | |
path: 'repotests/DjanGoat' | |
- uses: coursier/cache-action@v6 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- run: | | |
sbt stage assembly 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: ['17', '19', '20', '21'] | |
node-version: ['20.x'] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ShiftLeftSecurity/shiftleft-java-example' | |
path: 'repotests/shiftleft-java-example' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'juice-shop/juice-shop' | |
path: 'repotests/juice-shop' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'ShiftLeftSecurity/shiftleft-ts-example' | |
path: 'repotests/shiftleft-ts-example' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'libexpat/libexpat' | |
path: 'repotests/libexpat' | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'HooliCorp/DjanGoat' | |
path: 'repotests/DjanGoat' | |
- uses: coursier/cache-action@v6 | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'zulu' | |
java-version: ${{ matrix.java-version }} | |
- name: build | |
shell: pwsh | |
run: | | |
sbt stage createDistribution | |
cd wrapper\\nodejs | |
.\build.ps1 | |
npm install -g . | |
get-command atom | |
get-command astgen | |
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 |