Unit Tests #15
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: | |
| workflow_run: | |
| workflows: ["Build"] | |
| types: [completed] | |
| permissions: | |
| actions: read | |
| contents: read | |
| jobs: | |
| unit-tests: | |
| runs-on: ubuntu-latest | |
| if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| with: | |
| ref: ${{ github.event.workflow_run.head_sha }} | |
| submodules: recursive | |
| - name: Setup Build Tools | |
| uses: ./.github/actions/setup-build-tools | |
| - name: Download build artifacts | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh run download ${{ github.event.workflow_run.id }} --repo ${{ github.repository }} --name stagehand-build-artifacts --dir . | |
| - name: Restore unit test executable permissions | |
| shell: bash | |
| run: chmod +x tests/unit/build/stagehand_tests || true | |
| - name: Run unit tests | |
| run: python scripts/run_unit_tests.py |