fix: Improve coverage of Realtime.API tests (#642) #215
This file contains 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: Supabench | |
on: | |
push: | |
branches: | |
- main | |
env: | |
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} | |
jobs: | |
deploy: | |
name: Deploy QA application | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: superfly/[email protected] | |
with: | |
args: "-c deploy/fly/qa.toml scale count 1" | |
- uses: superfly/[email protected] | |
with: | |
args: "-c deploy/fly/qa.toml deploy --build-arg SLOT_NAME_SUFFIX=${GITHUB_SHA::7}" | |
- uses: superfly/[email protected] | |
if: always() | |
with: | |
args: "-c deploy/fly/qa.toml scale count 0" | |
- name: Get PR into variable | |
run: echo "PR_NUM=$(git show -s --format=%s | grep -Po '(?<=#)[0-9]*')" >> $GITHUB_ENV | |
- name: Start Supabench | |
run: | | |
curl --request POST \ | |
--url https://supabench.fly.dev/api/runs \ | |
--header 'Authorization: User ${{ secrets.BENCHMARK_JWT }}' \ | |
--data '{"benchmark_id":"SyMKxU3TOiWcAvU","name":"PR ${{ env.PR_NUM }}","comment": "https://github.com/supabase/realtime/pull/${{ env.PR_NUM }}", "origin":"main"}' |