forked from BewlyBewly/BewlyBewly
-
Notifications
You must be signed in to change notification settings - Fork 11
83 lines (69 loc) · 1.87 KB
/
Copy pathci.yml
File metadata and controls
83 lines (69 loc) · 1.87 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
name: CI
on:
push:
branches:
# The branch where the project source code resides
# 项目源代码所在的分支
- main
paths-ignore:
# Changes involving the following path files will not trigger the workflow
# 涉及以下路径文件的更改不会触发工作流
- LICENSE
- README.md
- README-cmn_CN.md
- README-cmn_TW.md
- README-jyut.md
- docs/**
pull_request:
branches:
- main
paths-ignore:
- LICENSE.txt
- README.md
- README-cmn_CN.md
- README-cmn_TW.md
- README-jyut.md
- docs/**
jobs:
test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
fail-fast: false
runs-on: ${{ matrix.os }}
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Lint
if: ${{ matrix.os == 'ubuntu-latest' }}
run: bun run lint
- name: Type check
if: ${{ matrix.os == 'ubuntu-latest' }}
run: bun run typecheck
- name: Test
run: bun run test
- name: Knip
if: ${{ matrix.os == 'ubuntu-latest' }}
run: bun run knip
- name: Build Chromium extension
run: bun run build
- name: Upload zip
if: ${{ matrix.os == 'ubuntu-latest' && github.ref_name == 'main' }}
uses: actions/upload-artifact@v7
with:
name: extension
path: extension
- name: Build Firefox extension
run: bun run build-firefox
- name: Upload zip
if: ${{ matrix.os == 'ubuntu-latest' && github.ref_name == 'main' }}
uses: actions/upload-artifact@v7
with:
name: extension-firefox
path: extension-firefox