Files
supabase/.github/workflows/playwright.yml
T
Ivan Vasilov 66ae36e005 feat: Playwright tests (#21083)
* initial commit for testing the github action.

* Improvements to the Github action.

* Add docker caching.

* Fix an issue in the github action.

* Another fix for the action.

* Just delete the db after the tests.

* Add a supabase app to the playwright-tests.

* Delete .env.testing.

* Remove the docker image caching from the Playwright github action.

* Add a README.md.

* Add an example test for the table editor.

* Ignore the generated keys.json.

* Add commands for running and writing tests.

* Remove Auth tests.

* Only show the react-query tool when not in test mode.

* Add data-testids to the buttons and use them in the test.

* Handle a case where SUPABASE_URL isn't defined.

* Fix the button test id.

* Remove some dependency.

* Try setting a timeout for an action.

* Add timeout to another action.

* Add some timeouts before the save button.

* Add some timeout before clicking save.

* Enable the video recording only during local testing.

* Minor fixes.

* Expand the README.
2024-02-19 12:12:54 +01:00

48 lines
1.2 KiB
YAML

name: Playwright Tests
on:
push:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
pull_request:
branches: [master]
paths:
- 'apps/studio/**'
- 'package-lock.json'
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- uses: supabase/setup-cli@v1
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npm run test:playwright
# - uses: actions/upload-artifact@v3
# if: always()
# with:
# name: playwright-report
# path: playwright-report/
# retention-days: 30