Skip to content

chore: add more test for Large Dataset example (#155) #638

chore: add more test for Large Dataset example (#155)

chore: add more test for Large Dataset example (#155) #638

Workflow file for this run

name: CI Build
on:
# Trigger the workflow on push or pull request,
# but only for the main branch on Push and any branches on PR
push:
branches: [main,next]
pull_request_target:
jobs:
run:
name: Node ${{ matrix.node }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: [18]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
fetch-depth: 3
- name: Use latest version of Node.js
uses: actions/setup-node@v4
with:
node-version: "*"
- name: Cache pnpm modules
uses: actions/cache@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: 8
run_install: true
- run: pnpm --version
- name: Prettier Check
run: pnpm prettier:check
- name: Build Library
run: pnpm build:lib
- name: Build Website (GitHub demo site)
run: pnpm build:demo
- name: Install Playwright Browsers (chromium)
run: pnpm exec playwright install chromium
- name: Start HTTP Server
run: pnpm serve:demo &
- name: Find Playwright Summary Comment (when exist)
if: ${{ github.event.pull_request.number }}
uses: peter-evans/find-comment@v2
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: Playwright Summary
- name: Run Playwright E2E Tests
uses: mathiasvr/[email protected]
id: playwrightsummary
with:
run: pnpm test:e2e
- name: Define Playwright Outcome Text
id: pw_outcome
if: always()
run: |
if [ ${{ steps.playwrightsummary.outcome }} == 'failure' ]; then
printf "pw_outcome=Failure :rotating_light:" >> $GITHUB_OUTPUT
else
echo "pw_outcome=Success :tada:" >> $GITHUB_OUTPUT
fi
shell: bash
- name: Upsert Playwright Summary
if: |
github.event.pull_request.number &&
always()
uses: peter-evans/create-or-update-comment@v3
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body: |
## :performing_arts: Playwright Summary - ${{ steps.pw_outcome.outputs.pw_outcome }}
### [Playwright Report](https://ghiscoding.github.io/multiple-select-vanilla/playwright-report)
${{ steps.playwrightsummary.outputs.stdout }} ${{ steps.playwrightsummary.outputs.stderr }}
edit-mode: replace
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 15
- name: Deploy Demo to gh-pages
if: |
github.ref == 'refs/heads/main' &&
(contains(github.event.head_commit.message, 'chore(release)') || contains(github.event.head_commit.message, '[refresh gh-pages]'))
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./demo/dist
- name: Deploy Playwright Report
if: always()
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
destination_dir: playwright-report
publish_dir: ./playwright-report