Skip to content

Commit 43b658f

Browse files
committed
Move cdxgen checkout to address yarn vs pnpm issue.
Signed-off-by: Caroline Russell <[email protected]>
1 parent 19422c5 commit 43b658f

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

.github/workflows/snapshot-tests.yml

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,26 +22,30 @@ jobs:
2222
steps:
2323

2424
- uses: actions/checkout@v4
25-
26-
- name: Set up pnpm
27-
uses: pnpm/action-setup@v4
25+
with:
26+
path: cdxgen_src
2827

2928
- name: cdxgen, custom-json-diff installs
3029
shell: bash
3130
env:
3231
SHELL: bash
3332
run: |
3433
rm -rf original_snapshots new_snapshots src_repos
34+
cd cdxgen_src
35+
corepack enable pnpm
3536
cdxgen_tarball=$(pnpm pack | tail -1)
3637
npm install -g "$cdxgen_tarball"
37-
git clone https://github.com/appthreat/cdxgen-samples.git original_snapshots
38+
cd ..
3839
python3.12 -m venv .venv
39-
source .venv/bin/activate && pip install -r test/diff/requirements.txt
40+
source .venv/bin/activate && pip install -r cdxgen_src/test/diff/requirements.txt
41+
git clone https://github.com/appthreat/cdxgen-samples.git original_snapshots
42+
cd original_snapshots
43+
git checkout feature/expand_snapshots_3
4044
4145
- name: Generate scripts
4246
run: |
4347
source .venv/bin/activate
44-
python test/diff/generate.py
48+
python cdxgen_src/test/diff/generate.py
4549
4650
- name: Upload shell scripts generated as artifact
4751
uses: actions/upload-artifact@v4
@@ -65,7 +69,7 @@ jobs:
6569
- name: Test BOMs
6670
run: |
6771
source .venv/bin/activate
68-
python test/diff/diff_tests.py --migrate-legacy
72+
python cdxgen_src/test/diff/diff_tests.py --migrate-legacy
6973
if test -f new_snapshots/diffs.json; then
7074
echo "status=FAILED" >> "$GITHUB_ENV"
7175
fi

test/diff/generate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def build_args():
1818
parser.add_argument(
1919
'--repo-csv',
2020
type=Path,
21-
default='test/diff/repos.csv',
21+
default='cdxgen_src/test/diff/repos.csv',
2222
help='Path to sources.csv',
2323
dest='repo_csv'
2424
)

0 commit comments

Comments
 (0)