generated from hbstack/template-mod
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: replace Cypress with Playwright
- Loading branch information
Showing
9 changed files
with
206 additions
and
1,795 deletions.
There are no files selected for viewing
42 changes: 19 additions & 23 deletions
42
.github/workflows/tests.yml → .github/workflows/playwright.yml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,47 @@ | ||
name: Tests | ||
|
||
on: push | ||
|
||
name: Playwright Tests | ||
on: | ||
push: | ||
jobs: | ||
build: | ||
test: | ||
strategy: | ||
matrix: | ||
version: | ||
- latest | ||
case: [default] | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- run: sudo apt-get install libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
|
||
node-version: lts/* | ||
- name: Setup caches | ||
uses: actions/cache@v4 | ||
with: | ||
path: /home/runner/.cache/hugo_cache | ||
key: ${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-hugomod-${{ hashFiles('**/go.sum') }} | ||
- name: Setup Go | ||
uses: actions/setup-go@v5 | ||
|
||
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: ${{ matrix.version }} | ||
extended: true | ||
|
||
- name: Install dependencies | ||
working-directory: tests/${{ matrix.case }} | ||
run: npm ci | ||
|
||
- name: Start Hugo server | ||
- name: Install Playwright Browsers | ||
working-directory: tests/${{ matrix.case }} | ||
run: hugo server & | ||
|
||
- name: Cypress run | ||
run: npx playwright install --with-deps | ||
- name: Run Playwright tests | ||
working-directory: tests/${{ matrix.case }} | ||
run: npx cypress run | ||
run: npx playwright test | ||
- uses: actions/upload-artifact@v4 | ||
working-directory: tests/${{ matrix.case }} | ||
if: always() | ||
with: | ||
name: playwright-report | ||
path: playwright-report/ | ||
retention-days: 30 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
node_modules/ | ||
/test-results/ | ||
/playwright-report/ | ||
/blob-report/ | ||
/playwright/.cache/ |
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.