forked from hmarr/openai-chat-tokens
-
Notifications
You must be signed in to change notification settings - Fork 1
89 lines (75 loc) · 1.97 KB
/
node.js.yaml
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
name: Node.js CI
on:
merge_group:
branches:
- main
pull_request:
branches:
- main
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
node-version: 23
cache: pnpm
- run: pnpm install --frozen-lockfile --strict-peer-dependencies
- run: pnpm run build --noEmit
- run: pnpm run lint
- run: pnpm run test
fix:
runs-on: ubuntu-latest
permissions:
contents: write
if: failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- uses: pnpm/action-setup@v4
with:
version: latest
- uses: actions/setup-node@v4
with:
cache: pnpm
node-version: 23
- run: |
pnpm install --fix-lockfile --no-frozen-lockfile
git add .
- id: commit-lockfile
uses: qoomon/actions--create-commit@v1
with:
message: |
📌 pnpm install --fix-lockfile
[dependabot skip]
skip-empty: true
- run: |
pnpm run format
git add .
- id: commit-format
uses: qoomon/actions--create-commit@v1
with:
message: |
🎨 pnpm run format
[dependabot skip]
skip-empty: true
- run: |
pnpm run lint:fix
git add .
- id: commit-lint
uses: qoomon/actions--create-commit@v1
with:
message: |
🚨 pnpm run lint:fix
[dependabot skip]
skip-empty: true
- if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit
run: git push