-
Notifications
You must be signed in to change notification settings - Fork 1
79 lines (76 loc) · 1.93 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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