ui component testing #23
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: Build and Test | |
'on': | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
build-and-lint: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Linting | |
run: bun run lint | |
- name: Run build job | |
run: | | |
cd apps/extension | |
bun run build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ai-prompt-snippets | |
path: apps/extension/dist | |
test-ui: | |
name: UI Component Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Install dependencies | |
run: bun install | |
- name: Run build job | |
run: bun run build | |
working-directory: packages/ui | |
- name: Test UI | |
uses: cypress-io/github-action@v5 | |
with: | |
command: cd packages/ui && bun run cy:test | |
playwright: | |
name: Playwright Tests | |
needs: build-and-lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest | |
- name: Download Artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
name: ai-prompt-snippets | |
path: apps/extension/dist | |
- name: Install dependencies | |
run: bun install | |
- name: Log folder structure on apps/extension/ | |
run: ls -al | |
working-directory: apps/extension/ | |
- name: Install Playwright Browsers | |
run: bunx playwright install --with-deps | |
- name: Run Playwright tests | |
run: bun run e2e:headless |