Sync to VibeCodingScientist/VCBench@301cb48 (residual Hauser strip) #7
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: docker | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - "Dockerfile" | |
| - ".dockerignore" | |
| - "pyproject.toml" | |
| - "src/**" | |
| - "tests/**" | |
| - ".github/workflows/docker.yml" | |
| jobs: | |
| build: | |
| name: Build CPU image + run tests in-container | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Build CPU image (no push) | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: Dockerfile | |
| push: false | |
| load: true | |
| tags: vcbench:ci | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Run unit tests inside the image | |
| run: | | |
| docker run --rm vcbench:ci python -m pytest tests/unit/ -q | |
| - name: Verify reusable APIs import inside the image | |
| run: | | |
| docker run --rm vcbench:ci python -c \ | |
| "from vcbench.protocols import common_label_set; \ | |
| from vcbench.probes import spread_error_correlation; \ | |
| from vcbench.contamination import validate_manifest; \ | |
| print('vcbench reusable APIs OK in CI image')" | |
| - name: Verify CLI works inside the image | |
| run: | | |
| docker run --rm vcbench:ci python -m vcbench levels | |
| docker run --rm vcbench:ci python -m vcbench audit-contamination |