Replace cypress with playwright (#170)

* cypress

* all

* global setup

* global setup

* setup node

* setup node

* setup node
This commit is contained in:
Ruben Fiszel
2022-07-05 01:46:43 +02:00
committed by GitHub
parent a9dd7cac55
commit 9883eae2e7
14 changed files with 104 additions and 66 deletions
+3 -7
View File
@@ -82,7 +82,7 @@ jobs:
labels: ${{ steps.metalocal.outputs.labels }}
cache-from: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
cypress:
playwright:
runs-on: [self-hosted, new]
needs: [build]
services:
@@ -99,18 +99,14 @@ jobs:
--health-interval 10s
--health-timeout 5s
--health-retries 5
container: cypress/browsers:node12.13.0-chrome78-ff70
steps:
- uses: actions/checkout@v3
- name: "Docker"
run: echo "::set-output name=id::$(docker run --network=host --rm -d -p 8000:8000 --privileged -it -e DATABASE_URL=postgres://admin:changeme@localhost:5432/windmill -e BASE_INTERNAL_URL=http://localhost:8000 ${{ env.LOCAL_REGISTRY }}/${{ env.IMAGE_NAME }}:latest)"
id: docker-container
- name: "Cypress run"
uses: cypress-io/github-action@v4
- name: "Playwright run"
timeout-minutes: 10
with:
working-directory: ./frontend
browser: chrome
run: cd frontend && npm ci @playwright/test && npx playwright install && npm run test
- name: "Clean up"
run: docker kill ${{ steps.docker-container.outputs.id }}
if: always()