Skip to content

Commit 60b834d

Browse files
committed
fix: resolve main branch workflow failures
- Advanced Metrics: Install project dependencies before running tests - SBOM Generation: Replace unsupported spdx-json format with json format - Use uv run for all test commands to ensure proper environment
1 parent 9260311 commit 60b834d

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

.github/workflows/advanced-metrics.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,16 @@ jobs:
4747

4848
- name: Install dependencies
4949
run: |
50-
python -m pip install --upgrade pip
51-
pip install coverage pytest cloc
50+
# Install project with dependencies first
51+
uv sync --frozen
52+
# Install additional tools
53+
uv pip install coverage pytest cloc
5254
5355
- name: Run tests with coverage
5456
run: |
55-
coverage run -m pytest tests/ --tb=short
56-
coverage report --format=total > coverage.txt
57-
coverage xml
57+
uv run coverage run -m pytest tests/ --tb=short
58+
uv run coverage report --format=total > coverage.txt
59+
uv run coverage xml
5860
5961
- name: Calculate lines of code
6062
run: |
@@ -88,7 +90,7 @@ jobs:
8890
- name: Run performance test
8991
run: |
9092
start_time=$(date +%s.%N)
91-
python -m pytest tests/ -x --tb=no -q
93+
uv run python -m pytest tests/ -x --tb=no -q
9294
end_time=$(date +%s.%N)
9395
9496
# Calculate duration in seconds

makefiles/quality.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ sbom-generate: dev-install ## Generate Software Bill of Materials (SBOM)
8888
./dev-tools/scripts/install_dev_tools.py --tool pip-audit
8989
@echo "Generating Python dependency SBOM..."
9090
$(call run-tool,pip-audit,--format=cyclonedx-json --output=python-sbom-cyclonedx.json)
91-
$(call run-tool,pip-audit,--format=spdx-json --output=python-sbom-spdx.json)
91+
$(call run-tool,pip-audit,--format=json --output=python-sbom.json)
9292
@echo "SBOM files generated successfully"
9393

9494
security-report: security sbom-generate ## Generate comprehensive security report

0 commit comments

Comments
 (0)