fix(engine): defer to scanner.scan when build_args is missing #438
Workflow file for this run
This file contains hidden or 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: Unit Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| # Run on PRs to any branch | |
| permissions: | |
| contents: read | |
| jobs: | |
| unit-tests: | |
| name: Unit Tests (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ['3.11', '3.12', '3.13'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| # Install the package itself with every optional extra so all | |
| # test modules can actually run. Tests for optional features | |
| # (argus view terminal / argus view browser / MCP server / AI classifier) | |
| # guard their imports with pytest.importorskip or module-level | |
| # stubs — without the extras those tests either skip or run | |
| # against fake stubs, and codecov's patch metric flags the | |
| # unexercised test bodies as missing coverage. Installing | |
| # [all] runs the real tests against the real code paths. | |
| pip install -e '.[all]' | |
| pip install pytest-deadfixtures | |
| - name: Run all tests | |
| run: pytest | |
| - name: Run E2E tests (slow, Docker-dependent) | |
| if: matrix.python-version == '3.13' | |
| run: pytest -m slow --no-cov -q || true | |
| - name: Check version reference coverage | |
| if: matrix.python-version == '3.13' | |
| run: python -m scripts.ci.check_version_refs | |
| - name: Check CLI docs are up to date | |
| if: matrix.python-version == '3.13' | |
| run: python -m scripts.ci.check_cli_docs | |
| - name: Check container image manifests | |
| if: matrix.python-version == '3.13' | |
| run: python -m scripts.ci.check_container_images | |
| - name: Check for dead fixtures | |
| if: always() | |
| run: | | |
| pip install pytest-deadfixtures | |
| python -m pytest --dead-fixtures --no-cov -q 2>&1 || true | |
| - name: Coverage Report Summary | |
| if: always() | |
| run: | | |
| { | |
| echo "## Coverage Report" | |
| echo "" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| if [ -f coverage/python.lcov ]; then | |
| { | |
| echo "### Python Coverage" | |
| echo "\`\`\`" | |
| head -20 coverage/python.lcov || true | |
| echo "\`\`\`" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| fi | |
| - name: Test Summary | |
| if: always() | |
| run: | | |
| { | |
| echo "## Unit Test Results" | |
| echo "" | |
| echo "✅ All tests completed!" | |
| echo "" | |
| echo "**Test Coverage:**" | |
| echo "- Python tests (utilities, ClamAV & docsite)" | |
| echo "- Action schema validation" | |
| echo "" | |
| echo "See detailed coverage reports in artifacts" | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload coverage to Codecov | |
| if: always() | |
| uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6 | |
| with: | |
| files: ./coverage/python.xml | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: false | |
| verbose: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload coverage artifacts | |
| if: always() | |
| uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7 | |
| with: | |
| name: coverage-reports-py${{ matrix.python-version }} | |
| path: | | |
| coverage/ | |
| htmlcov/ | |
| retention-days: 30 |