-
Notifications
You must be signed in to change notification settings - Fork 45
87 lines (71 loc) · 1.96 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
81
82
83
84
85
86
87
name: CI
on:
push:
branches:
- 'main'
tags:
- 'v*'
pull_request:
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/[email protected]
with:
node-version: 20
cache: yarn
# See https://github.com/yarnpkg/yarn/issues/1874
# https://github.com/yarnpkg/yarn/issues/3728
- name: Pre-install node-gyp
run: |-
npm install -g node-gyp
node-gyp install
# Check the build works. No need to run the build:edge target since it's
# almost identical to build:chrome
- name: Build
run: |-
yarn install --frozen-lockfile
yarn build:firefox
yarn build:chrome
yarn build:thunderbird
- name: Run tests
env:
CI: true
run: yarn test
# Check packaging doesn't error. Again, no need to worry about the
# package:edge target.
- name: Package
run: |-
yarn package:firefox
yarn package:chrome
- name: Verify cosmos setup
run: yarn cosmos-export
lint:
runs-on: ubuntu-latest
name: Lint
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup node
uses: actions/[email protected]
with:
node-version: 20
cache: yarn
# See https://github.com/yarnpkg/yarn/issues/1874
# https://github.com/yarnpkg/yarn/issues/3728
- name: Pre-install node-gyp
run: |-
npm install -g node-gyp
node-gyp install
- name: Install
run: yarn install --frozen-lockfile
- name: Lint
run: yarn eslint scripts src tests "*.{cjs,js,json,ts}"
- name: Check formatting
run: yarn prettier --check _locales css scripts src tests "*.{js,json,md,ts}"
- name: knip
run: yarn knip