fix script #136
Workflow file for this run
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
name: CI | |
on: | |
push: | |
jobs: | |
unit_test: | |
name: 'Unit Tests' | |
runs-on: ubuntu-latest | |
# strategy: | |
# matrix: | |
# node-version: [16.x, 18.x] | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
# - name: Install bun manually | |
# run: env|sort;curl -fsSL https://bun.sh/install | bash && mv ~/.bun/bin/bun /usr/local/bin && cd /usr/local/bin && ln -s bun bunx | |
# https://bun.sh/guides/runtime/cicd | |
- name: Install bun | |
uses: oven-sh/setup-bun@v1 | |
# run any `bun` or `bunx` command | |
- name: bun version | |
run: bun --version | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: unit test | |
run: bun run test:unit | |
# - name: e2e test | |
# run: bun run test:e2e | |
# - name: Use Node.js ${{ matrix.node-version }} | |
# uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ matrix.node-version }} | |
# cache: 'npm' | |
# - run: npm ci | |
# - run: npm run build --if-present | |
# - run: npm test | |
# Playwright Tests | |
# output report | |
# need to preview with npx playwright show-report name-of-my-extracted-playwright-report | |
html_report: | |
name: 'Playwright Tests : report to html' | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build | |
run: bun run build | |
- name: Install Playwright Browsers | |
run: bunx playwright install --with-deps | |
- name: Run Playwright tests | |
run: bunx playwright test --update-snapshots | |
- uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: playwright-report | |
path: playwright-report/ | |
retention-days: 30 | |
# output to github | |
# use container | |
github_report: | |
name: 'Playwright Tests : report to github' | |
runs-on: ubuntu-latest | |
container: | |
image: mcr.microsoft.com/playwright:v1.39.0-jammy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install unzip | |
run: apt-get update && apt-get install -y unzip && rm -rf /var/lib/apt/lists/* | |
- uses: oven-sh/setup-bun@v1 | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Build | |
run: bun run build | |
- name: Install Playwright Browsers | |
run: bunx playwright install msedge && bunx playwright install chrome | |
- name: Run your tests | |
run: HOME=/root GITHUB_REPORT=1 bunx playwright test --update-snapshots |