-
-
Notifications
You must be signed in to change notification settings - Fork 261
167 lines (140 loc) · 3.73 KB
/
Copy pathchecks.yml
File metadata and controls
167 lines (140 loc) · 3.73 KB
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
on:
pull_request:
paths-ignore:
- "**.md"
- "docs/**"
- "examples/**"
push:
branches: [master]
paths-ignore:
- "**.md"
- "docs/**"
- "examples/**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read
env:
IBM_TELEMETRY_DISABLED: true
jobs:
lint:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun ci
- run: bunx biome ci --error-on-warnings
changes:
runs-on: macos-15
outputs:
src-or-tests: ${{ steps.filter.outputs.src-or-tests }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
src-or-tests:
- 'src/**'
- 'tests/**'
- '.github/**'
test:
needs: [lint, changes]
if: needs.changes.outputs.src-or-tests == 'true'
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun ci
- name: Generate types
run: bun run build:docs
- name: Test types (Svelte 5)
run: bun run test:types
- name: Test (Svelte 5)
run: bun --bun run test
test-e2e:
needs: [lint, test]
if: ${{ !failure() && !cancelled() }}
runs-on: ubuntu-latest
# Official image includes Chromium/Firefox/WebKit + system deps
# Bump tag with @playwright/test in bun.lock.
container:
image: mcr.microsoft.com/playwright:v1.59.0-noble
options: --ipc=host --init
timeout-minutes: 15
env:
PLAYWRIGHT_BROWSERS_PATH: /ms-playwright
HOME: /root
steps:
- uses: actions/checkout@v6
# Playwright image is minimal; setup-bun extracts a zip and needs unzip.
- run: apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y unzip
- uses: oven-sh/setup-bun@v2
- run: bun ci
- name: E2E tests
run: bunx playwright test --project=chromium
test-svelte3:
needs: [lint, changes]
if: needs.changes.outputs.src-or-tests == 'true'
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun ci
- name: Setup Svelte 3
run: |
cd tests-svelte3
bun ci
- name: Generate types
run: bun run build:docs
- name: Test Svelte 3 Types
run: |
cd tests-svelte3
bun run test:types
- name: Test Svelte 3
run: |
cd tests-svelte3
bun --bun run test
test-svelte4:
needs: [lint, changes]
if: needs.changes.outputs.src-or-tests == 'true'
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun ci
- name: Setup Svelte 4 compat
run: |
cd tests-svelte4
bun ci
- name: Generate types
run: bun run build:docs
- name: Test types (Svelte 4 compat)
run: |
cd tests-svelte4
bun run test:types
- name: Test (Svelte 4 compat)
run: |
cd tests-svelte4
bun --bun run test
types:
runs-on: macos-15
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
- run: bun ci
- name: Build docs
run: bun run build:docs
- run: bun run test:src-types
deploy-docs:
needs: [lint, test, types]
if: |
always() &&
(github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master') &&
!failure() && !cancelled()
uses: ./.github/workflows/deploy-docs.yml
secrets: inherit