Smoketests #60
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: Smoketests | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| environment: | |
| description: "Target environment" | |
| type: choice | |
| default: dev | |
| options: | |
| - dev | |
| - prod | |
| jobs: | |
| smoketests: | |
| runs-on: ubuntu-slim | |
| timeout-minutes: 120 | |
| steps: | |
| - name: Checkout | |
| uses: runloopai/checkout@main | |
| - name: Setup uv | |
| uses: runloopai/setup-uv@main | |
| with: | |
| python-version: "3.11" | |
| - name: Create virtualenv | |
| run: uv venv | |
| - name: Install dependencies | |
| run: | | |
| uv pip install -r requirements-dev.lock | |
| - name: Configure environment | |
| env: | |
| DEV_KEY: ${{ secrets.RUNLOOP_SMOKETEST_DEV_API_KEY }} | |
| PROD_KEY: ${{ secrets.RUNLOOP_SMOKETEST_PROD_API_KEY }} | |
| run: | | |
| if [ "${{ github.event.inputs.environment }}" = "prod" ]; then | |
| echo "RUNLOOP_API_KEY=${PROD_KEY}" >> $GITHUB_ENV | |
| echo "RUNLOOP_BASE_URL=https://api.runloop.ai" >> $GITHUB_ENV | |
| else | |
| echo "RUNLOOP_API_KEY=${DEV_KEY}" >> $GITHUB_ENV | |
| echo "RUNLOOP_BASE_URL=https://api.runloop.pro" >> $GITHUB_ENV | |
| fi | |
| echo "DEBUG=false" >> $GITHUB_ENV | |
| echo "PYTHONPATH=${{ github.workspace }}/src" >> $GITHUB_ENV | |
| - name: Run smoke tests (pytest via uv) | |
| env: | |
| # Use 5 workers to run files in parallel. | |
| # Tests within a file are run sequentially. | |
| PYTEST_ADDOPTS: "-n 5 -m smoketest" | |
| run: | | |
| uv run pytest -q -vv tests/smoketests |