Configure global setup and teardown for your test suites using GitHub Actions while native support is in development.
We currently do not support global setup and teardown natively. It is on our roadmap, and we’d love to chat with you about your specific use case.In the meantime, you can trigger Stably tests in GitHub Actions and add setup and teardown steps. Here is an example:
Copy
name: Stably Test Runner Exampleon: pull_request: push: branches: - master# You need to set these permissions if using the `github-comment` optionpermissions: pull-requests: write contents: readjobs: stably-test-action: name: Stably Test Runner runs-on: ubuntu-latest steps: - name: Global Setup run: echo "Running global setup tasks" - name: Stably Runner Action id: stably-runner uses: stablyai/stably-runner-action@v4 with: api-key: ${{ secrets.STABLY_API_KEY }} test-suite-id: clsv2qusn000111w9xs23b4uh # Replace with your test suite ID - name: Global Tear Down run: echo "Running global teardown tasks"
You will need an API key to trigger Stably from GitHub Actions. Visit the settings page to find the key.