Skip to content

Commit

Permalink
Replace Cypress with Playwright (#578)
Browse files Browse the repository at this point in the history
  • Loading branch information
Janaka-Steph authored Jan 5, 2023
1 parent 8e4a6c3 commit b158602
Show file tree
Hide file tree
Showing 41 changed files with 872 additions and 1,634 deletions.
47 changes: 17 additions & 30 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 16

- name: Run Nigiri
uses: vulpemventures/nigiri-github-action@v1

- name: Sleep for 5 seconds
run: sleep 5s
shell: bash

- name: Install and Run TDEX Daemon
shell: 'script -q -e -c "bash {0}"'
run: yarn tdex:run-initialized
Expand All @@ -38,37 +38,24 @@ jobs:
npm start &
cd ..
- name: Sleep for 5 seconds
run: sleep 5s
shell: bash

#- name: Cypress run
# uses: cypress-io/github-action@v4
# with:
# start: yarn run serve:no-open
# wait-on: 'http://localhost:8100'

#- uses: actions/upload-artifact@v2
# NOTE: screenshots will be generated only if E2E test failed
# thus we store screenshots only on failures
# if: failure()
# with:
# name: cypress-screenshots
# path: cypress/screenshots
# retention-days: 5

#- uses: actions/upload-artifact@v2
# if: always()
# with:
# name: cypress-videos
# path: cypress/videos
# retention-days: 5

- run: yarn install --frozen-lockfile

- name: Lint
run: yarn lint

- name: Install Playwright Browsers
run: yarn playwright install --with-deps

- name: Run Playwright tests
run: yarn playwright test

- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30

- name: Test
run: yarn test --ci --maxWorkers=2

Expand Down
15 changes: 6 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

# setup nodejs
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: "16"
node-version: 16

- name: set up Java 17
uses: actions/setup-java@v2
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
cache: gradle

# Build Ionic App
- run: yarn install --frozen-lockfile

- name: build ionic android
Expand All @@ -40,9 +38,8 @@ jobs:
arguments: build
build-root-directory: ./android


- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: APKs
path: ./android/app/build/outputs/apk/
Expand All @@ -55,4 +52,4 @@ jobs:
./android/app/build/outputs/apk/debug/app-debug.apk
./android/app/build/outputs/apk/release/app-release-unsigned.apk
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,6 @@ resources/windows/splash
# keys
*.keystore*

# Cypress
cypress/videos
cypress/screenshots
/test-results/
/playwright-report/
/playwright/.cache/
86 changes: 0 additions & 86 deletions cypress.config.ts

This file was deleted.

7 changes: 0 additions & 7 deletions cypress/component/ComponentName.cy.ts

This file was deleted.

159 changes: 0 additions & 159 deletions cypress/e2e/main.cy.ts

This file was deleted.

Loading

0 comments on commit b158602

Please sign in to comment.