|
1 | | -#name: Node.js CI |
| 1 | +name:Node.js CI |
2 | 2 |
|
3 | | -#on: |
4 | | -# merge_group: |
5 | | -# branches: |
6 | | -# - main |
7 | | -# pull_request: |
8 | | -# branches: |
9 | | -# - main |
10 | | -# push: |
11 | | -# branches: |
12 | | -# - main |
| 3 | +on: |
| 4 | +merge_group: |
| 5 | +branches: |
| 6 | + -main |
| 7 | +pull_request: |
| 8 | +branches: |
| 9 | + -main |
| 10 | +push: |
| 11 | +branches: |
| 12 | + -main |
13 | 13 |
|
14 | | -#jobs: |
15 | | -# test: |
16 | | -# runs-on: ubuntu-latest |
17 | | -# env: |
18 | | -# INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }} |
| 14 | +jobs: |
| 15 | +test: |
| 16 | +runs-on:ubuntu-latest |
| 17 | +env: |
| 18 | +INKEEP_API_KEY:${{ secrets.INKEEP_API_KEY }} |
19 | 19 |
|
20 | | -# steps: |
21 | | -# - uses: actions/checkout@v4 |
22 | | -# - uses: pnpm/action-setup@v4 |
23 | | -# with: |
24 | | -# version: latest |
25 | | -# - uses: actions/setup-node@v4 |
26 | | -# with: |
27 | | -# node-version: 22 |
28 | | -# cache: pnpm |
29 | | -# - run: pnpm install --frozen-lockfile --strict-peer-dependencies |
30 | | -# - run: pnpm run build |
31 | | -# env: |
32 | | -# INKEEP_API_KEY: ${{ secrets.INKEEP_API_KEY }} |
33 | | -# - run: pnpm run lint |
| 20 | +steps: |
| 21 | + -uses:actions/checkout@v4 |
| 22 | + -uses:pnpm/action-setup@v4 |
| 23 | +with: |
| 24 | +version:latest |
| 25 | + -uses:actions/setup-node@v4 |
| 26 | +with: |
| 27 | +node-version:22 |
| 28 | +cache:pnpm |
| 29 | + -run:pnpm install --frozen-lockfile --strict-peer-dependencies |
| 30 | + -name:Print INKEEP_API_KEY length |
| 31 | +run:| |
| 32 | + echo "INKEEP_API_KEY Length: ${#INKEEP_API_KEY}" |
| 33 | + -run:pnpm run build |
| 34 | +env: |
| 35 | +INKEEP_API_KEY:${{ secrets.INKEEP_API_KEY }} |
| 36 | + -run:pnpm run lint |
34 | 37 |
|
35 | | -# fix: |
36 | | -# runs-on: ubuntu-latest |
| 38 | +fix: |
| 39 | +runs-on:ubuntu-latest |
37 | 40 |
|
38 | | -# permissions: |
39 | | -# contents: write |
| 41 | +permissions: |
| 42 | +contents:write |
40 | 43 |
|
41 | | -# needs: |
42 | | -# - test |
| 44 | +needs: |
| 45 | + -test |
43 | 46 |
|
44 | | -# if: failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act' |
| 47 | +if:failure() && github.event_name != 'merge_group' && github.actor != 'github-actions[bot]' && github.actor != 'nektos/act' |
45 | 48 |
|
46 | | -# steps: |
47 | | -# - uses: actions/checkout@v4 |
48 | | -# with: |
49 | | -# ref: ${{ github.ref }} |
50 | | -# - uses: pnpm/action-setup@v4 |
51 | | -# with: |
52 | | -# version: latest |
53 | | -# - uses: actions/setup-node@v4 |
54 | | -# with: |
55 | | -# cache: pnpm |
56 | | -# node-version: 22 |
| 49 | +steps: |
| 50 | + -uses:actions/checkout@v4 |
| 51 | +with: |
| 52 | +ref:${{ github.ref }} |
| 53 | + -uses:pnpm/action-setup@v4 |
| 54 | +with: |
| 55 | +version:latest |
| 56 | + -uses:actions/setup-node@v4 |
| 57 | +with: |
| 58 | +cache:pnpm |
| 59 | +node-version:22 |
57 | 60 |
|
58 | | -# - run: | |
59 | | -# pnpm install --fix-lockfile --no-frozen-lockfile |
60 | | -# git add . |
61 | | -# - id: commit-lockfile |
62 | | -# uses: qoomon/actions--create-commit@v1 |
63 | | -# with: |
64 | | -# message: | |
65 | | -# 📌 pnpm install --fix-lockfile |
| 61 | + -run:| |
| 62 | + pnpm install --fix-lockfile --no-frozen-lockfile |
| 63 | + git add . |
| 64 | + -id:commit-lockfile |
| 65 | +uses:qoomon/actions--create-commit@v1 |
| 66 | +with: |
| 67 | +message:| |
| 68 | + 📌 pnpm install --fix-lockfile |
66 | 69 |
|
67 | | -# [dependabot skip] |
68 | | -# skip-empty: true |
| 70 | + [dependabot skip] |
| 71 | +skip-empty:true |
69 | 72 |
|
70 | | -# - run: | |
71 | | -# pnpm run format |
72 | | -# git add . |
73 | | -# - id: commit-format |
74 | | -# uses: qoomon/actions--create-commit@v1 |
75 | | -# with: |
76 | | -# message: | |
77 | | -# 🎨 pnpm run format |
| 73 | + -run:| |
| 74 | + pnpm run format |
| 75 | + git add . |
| 76 | + -id:commit-format |
| 77 | +uses:qoomon/actions--create-commit@v1 |
| 78 | +with: |
| 79 | +message:| |
| 80 | + 🎨 pnpm run format |
78 | 81 |
|
79 | | -# [dependabot skip] |
80 | | -# skip-empty: true |
| 82 | + [dependabot skip] |
| 83 | +skip-empty:true |
81 | 84 |
|
82 | | -# - run: | |
83 | | -# pnpm run lint:fix |
84 | | -# git add . |
85 | | -# - id: commit-lint |
86 | | -# uses: qoomon/actions--create-commit@v1 |
87 | | -# with: |
88 | | -# message: | |
89 | | -# 🚨 pnpm run lint:fix |
| 85 | + -run:| |
| 86 | + pnpm run lint:fix |
| 87 | + git add . |
| 88 | + -id:commit-lint |
| 89 | +uses:qoomon/actions--create-commit@v1 |
| 90 | +with: |
| 91 | +message:| |
| 92 | + 🚨 pnpm run lint:fix |
90 | 93 |
|
91 | | -# [dependabot skip] |
92 | | -# skip-empty: true |
| 94 | + [dependabot skip] |
| 95 | +skip-empty:true |
93 | 96 |
|
94 | | -# - if: steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit |
95 | | -# run: git push |
| 97 | + -if:steps.commit-lockfile.outputs.commit || steps.commit-format.outputs.commit || steps.commit-lint.outputs.commit |
| 98 | +run:git push |