Skip to content

Reachables tests

Reachables tests #1493

name: Reachables tests
on:
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
java-sample1:
strategy:
fail-fast: false
matrix:
node-version: ['23.x']
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
corepack enable
corepack pnpm install
mkdir -p repotests
mkdir -p bomresults
- uses: actions/checkout@v4
with:
repository: 'DependencyTrack/dependency-track'
path: 'repotests/dependency-track'
ref: '4.11.1'
- name: compile
run: |
cd repotests/dependency-track
mvn -q clean compile -DskipTests -Dmaven.test.skip=true
- name: repotests
run: |
node bin/cdxgen.js -p -t java --profile research -o repotests/dependency-track/bom.json repotests/dependency-track
ls -ltr repotests/dependency-track/
cp -rf repotests/dependency-track/*.json bomresults/
env:
CDXGEN_DEBUG_MODE: debug
- uses: actions/upload-artifact@v4
with:
name: bomresults
path: bomresults
ruby-sample1:
strategy:
fail-fast: false
matrix:
node-version: ['23.x']
os: ['ubuntu-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '23'
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build
run: |
corepack enable
corepack pnpm install
echo "${GITHUB_WORKSPACE}/node_modules/.bin" >> "$GITHUB_PATH"
mkdir -p repotests
mkdir -p rubyresults
- uses: actions/checkout@v4
with:
repository: 'campsite/campsite'
path: 'repotests/campsite'
ref: '10197238bbbefd9c9ac7c77467b647fd93993ba0'
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.4'
bundler-cache: true
id: ruby33
- name: bundle install
run: |
cd repotests/campsite/api
bundle install
env:
BUNDLE_PATH: vendor/bundle
- uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true
id: ruby34
- name: generate sbom with reachables
run: |
cd repotests/campsite/api
echo "PATH: ${PATH}"
rbastgen --help
echo "ATOM_RUBY_HOME: ${ATOM_RUBY_HOME}"
echo "BUNDLE_PATH: ${BUNDLE_PATH}"
node $GITHUB_WORKSPACE/bin/cdxgen.js -p -t ruby --profile research -o bom.json . --lifecycle pre-build
ls -lh
cp bom.json *.slices.json $GITHUB_WORKSPACE/rubyresults
env:
CDXGEN_DEBUG_MODE: debug
ATOM_RUBY_HOME: ${{ steps.ruby34.outputs.ruby-prefix }}
CDXGEN_GEM_HOME: ${{ github.workspace }}/repotests/campsite/api/vendor/bundle
- uses: actions/upload-artifact@v4
with:
name: rubyresults
path: rubyresults