[PB] Support Generic Computer Interface #44
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: Run PaperBench Tests | |
| on: | |
| pull_request: | |
| paths: | |
| - 'project/paperbench/**' | |
| - 'project/common/alcatraz/**' | |
| - 'project/common/nanoeval/**' | |
| - 'project/common/nanoeval_alcatraz/**' | |
| - 'project/common/preparedness_turn_completer/**' | |
| branches: [ '**' ] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| workflow_dispatch: | |
| inputs: | |
| test_branch: | |
| description: 'Branch to run the tests on' | |
| required: false | |
| default: 'main' | |
| jobs: | |
| test: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| env: | |
| OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| fetch-depth: 1 | |
| - name: Hydrate PaperBench data | |
| run: | | |
| git lfs fetch --include "project/paperbench/data/**" --exclude "" | |
| git lfs checkout project/paperbench/data | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: Install dependencies | |
| working-directory: ./project/paperbench | |
| env: | |
| UV_GIT_LFS: 1 | |
| run: | | |
| uv sync | |
| - name: Set up Docker | |
| uses: docker/setup-buildx-action@v3 | |
| - uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver: docker | |
| install: true | |
| - name: Build pb-env | |
| working-directory: ./project/paperbench | |
| run: | | |
| docker buildx build \ | |
| --builder default \ | |
| --platform=linux/amd64 \ | |
| --load \ | |
| -t pb-env \ | |
| -f paperbench/Dockerfile.base . | |
| - name: Run tests | |
| working-directory: ./project/paperbench | |
| run: | | |
| uv run pytest -n 10 -vrs |