v1.0.3 #66
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: | |
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: Download cypress binary | |
run: bun cypress install | |
- name: Run build job | |
run: bun run build | |
working-directory: packages/ui | |
- name: Test UI using Cypress | |
run: cd packages/ui && bun run cy:test | |
build: | |
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@v4 | |
with: | |
name: ai-prompt-snippets | |
path: apps/extension/dist | |
playwright: | |
name: Playwright Tests | |
needs: | |
- test-ui | |
- build | |
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: actions/download-artifact@v4 | |
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 |