Skip to content

Commit

Permalink
use playwright in all apps (#1417)
Browse files Browse the repository at this point in the history
  • Loading branch information
noshiro-pf authored Jan 22, 2025
1 parent 5a4de88 commit de8883a
Show file tree
Hide file tree
Showing 324 changed files with 1,272 additions and 3,762 deletions.
38 changes: 13 additions & 25 deletions .github/workflows/e2e-apps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,9 @@ on:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
cypress-run:
e2e-run:
timeout-minutes: 30
runs-on: ubuntu-latest
container:
image: cypress/browsers:node-20.14.0-chrome-126.0.6478.114-1-ff-127.0.1-edge-126.0.2592.61-1
options: --user 1001

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -67,33 +64,24 @@ jobs:
cache: 'yarn'
cache-dependency-path: yarn.lock

# Set up GitHub Actions caching for Wireit.
# - uses: google/wireit@setup-github-actions-caching/v1.0.2

# - run: echo '${{ toJSON(steps.setup_node_id.outputs) }}'
# - if: ${{ steps.setup_node_id.outputs.cache-hit != 'true' }}
- name: yarn install
run: yarn --frozen-lockfile

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

- name: Build dependencies
run: yarn zz:wsrun-stages --recursive -p @noshiro/${{ matrix.app_name }} -c build

- name: Cypress run on Chrome
uses: cypress-io/[email protected]
- name: Run Playwright tests
run: yarn workspace @noshiro/${{ matrix.app_name }} e2e

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
browser: chrome
install: false
working-directory: packages/apps/${{ matrix.app_name }}/cypress
spec: cypress/e2e/**/*.cy.ts
start: yarn start:dev-server
wait-on: 'http://[::1]:5180'
wait-on-timeout: 120
# headless: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# Recommended: pass the GitHub token lets this action correctly
# determine the unique run id necessary to re-run the checks
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
name: playwright-report
path: packages/apps/{{ matrix.app_name }}/playwright-report/
retention-days: 30

e2e-event-schedule-app:
timeout-minutes: 30
Expand Down
1 change: 0 additions & 1 deletion docs/updating-packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ $ yarn add --dev -W \
```sh
$ yarn add --dev -W \
eslint-plugin-jest@latest \
cypress@latest \
jest@latest \
jest-environment-jsdom@latest \
jest-fetch-mock@latest \
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"cross-env": "^7.0.3",
"cspell": "^8.14.2",
"css-loader": "^6.2.0",
"cypress": "^13.10.0",
"dotenv": "^16.0.3",
"esbuild": "^0.20.2",
"file-loader": "^6.2.0",
Expand Down
1 change: 0 additions & 1 deletion packages/apps/algo-app/.gitignore

This file was deleted.

16 changes: 16 additions & 0 deletions packages/apps/algo-app/configs/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { toThisDir } from '@noshiro/mono-utils';
import path from 'node:path';
import { definePlaywrightConfig } from '../../../../configs/define-playwright-config.mjs';

const thisDir = toThisDir(import.meta.url);

export default definePlaywrightConfig({
baseURL: 'http://localhost:5180',
testDir: path.resolve(thisDir, '..', 'e2e'),
webServer: [
{
url: 'http://localhost:5180',
command: 'yarn start:dev-server',
},
],
});
16 changes: 0 additions & 16 deletions packages/apps/algo-app/cypress/cypress.config.ts

This file was deleted.

10 changes: 0 additions & 10 deletions packages/apps/algo-app/cypress/cypress/e2e/main.cy.ts

This file was deleted.

5 changes: 0 additions & 5 deletions packages/apps/algo-app/cypress/cypress/fixtures/example.json

This file was deleted.

3 changes: 0 additions & 3 deletions packages/apps/algo-app/cypress/cypress/index.ts

This file was deleted.

38 changes: 0 additions & 38 deletions packages/apps/algo-app/cypress/cypress/support/commands.ts

This file was deleted.

21 changes: 0 additions & 21 deletions packages/apps/algo-app/cypress/cypress/support/e2e.ts

This file was deleted.

4 changes: 0 additions & 4 deletions packages/apps/algo-app/cypress/cypress/tsconfig.json

This file was deleted.

Loading

0 comments on commit de8883a

Please sign in to comment.