-
-
Notifications
You must be signed in to change notification settings - Fork 33
116 lines (90 loc) · 2.6 KB
/
Copy pathtest.yml
File metadata and controls
116 lines (90 loc) · 2.6 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
name: Test
on:
push:
branches:
- main
- beta
- "[0-9]+.[0-9]+.x"
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: read
jobs:
lint:
name: Lint, format & types
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Type-check (tsc)
run: npm run type-check
- name: Lint (oxlint)
run: npm run lint
- name: Check formatting (oxfmt)
run: npm run format:check
# Type-aware linting runs oxlint's tsgolint backend on typescript-go. Kept
# non-blocking while type-aware linting is still alpha upstream.
- name: Type-aware lint (oxlint + tsgolint)
run: npm run lint:type-aware
continue-on-error: true
test:
name: Run tests on Node.js ${{ matrix.node-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node-version: [20, 22, 24]
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:cov
- name: Collect coverage
if: matrix.node-version == 24
uses: coverallsapp/github-action@v2
with:
file: ./coverage/lcov.info
size:
name: Check bundle size
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: npm ci
# Runs size-limit (builds first via the `presize` script), failing if the main entry exceeds
# its budget — e.g. if the full MIME table leaks back out of the `file-selector/mime` subpath.
- name: Check bundle size
run: npm run size
e2e:
name: Run e2e (browser) tests
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: 24
- name: Install dependencies
run: npm ci
- name: Install Playwright Chromium
run: npx playwright install --with-deps chromium
- name: Run e2e tests
run: npm run test:e2e