forked from FooSoft/yomichan
-
Notifications
You must be signed in to change notification settings - Fork 112
80 lines (69 loc) · 1.91 KB
/
ci.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
80
name: CI
permissions:
contents: read
on:
push:
branches: [master]
pull_request:
merge_group:
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: JavaScript
test: test:js
- name: TypeScript (main)
test: test:ts:main
- name: TypeScript (dev)
test: test:ts:dev
- name: TypeScript (test)
test: test:ts:test
- name: TypeScript (bench)
test: test:ts:bench
- name: CSS
test: test:css
- name: HTML
test: test:html
- name: Markdown
test: test:md
- name: JSON
test: test:json
- name: Unit Tests
test: test:unit
- name: Unit Tests (options)
test: test:unit:options
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run ${{ matrix.name }} tests
run: npm run ${{ matrix.test }}
test-build:
name: Test Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Build Legal
run: npm run license-report:html
- name: Build
run: npm run build
- name: Validate manifest.json of the extension
uses: cardinalby/schema-validator-action@2166123eb256fa40baef7e22ab1379708425efc7 # v3.1.1
with:
file: ext/manifest.json
schema: "https://json.schemastore.org/chrome-manifest.json"
fixSchemas: true
bench:
name: Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
- name: Run Benchmarks
uses: CodSpeedHQ/action@513a19673a831f139e8717bf45ead67e47f00044 # v3.2
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: npm run bench