-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
84 lines (68 loc) · 1.81 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false # minimize exposure and prevent accidental pushes
- name: Enable Corepack
run: corepack enable
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- name: Install dependencies
run: yarn --immutable
env:
YARN_ENABLE_SCRIPTS: 0 # disable postinstall scripts
- name: Lint code
run: yarn test:lint
- name: Run Flow
run: yarn test:flow
if: always()
- name: Run Jest tests
run: yarn test:jest --coverage
if: always()
- name: Build
run: yarn build
- uses: codecov/codecov-action@v3
with:
directory: ./coverage/
timeout-minutes: 3
release:
runs-on: ubuntu-latest
if: github.event_name == 'push'
environment: release
needs: test
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
fetch-depth: 0
- name: Enable Corepack
run: corepack enable
- name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: '20'
cache: yarn
- name: Install dependencies
run: yarn --immutable
env:
YARN_ENABLE_SCRIPTS: 0 # disable postinstall scripts
- name: Run semantic-release
run: yarn run semantic-release --debug
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GIT_AUTHOR_NAME: KaTeX bot
GIT_AUTHOR_EMAIL: 33710906+KaTeX-bot@users.noreply.github.com
GIT_COMMITTER_NAME: KaTeX bot
GIT_COMMITTER_EMAIL: 33710906+KaTeX-bot@users.noreply.github.com