Skip to content

Commit 08bd61b

Browse files
committed
infra: move check-code-generation job to pr.yml
1 parent f934792 commit 08bd61b

File tree

2 files changed

+61
-53
lines changed

2 files changed

+61
-53
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -203,56 +203,3 @@ jobs:
203203
with:
204204
token: ${{ secrets.CODECOV_TOKEN }}
205205
fail_ci_if_error: true
206-
207-
check-code-generation:
208-
runs-on: ubuntu-latest
209-
name: 'Check Code Generation: node-18, ubuntu-latest'
210-
permissions:
211-
pull-requests: write
212-
steps:
213-
- name: Checkout
214-
uses: actions/checkout@v3
215-
with:
216-
fetch-depth: 0
217-
218-
- name: Install pnpm
219-
uses: pnpm/[email protected]
220-
with:
221-
version: 7
222-
223-
- name: Set node version to 18
224-
uses: actions/setup-node@v3
225-
with:
226-
node-version: 18
227-
cache: 'pnpm'
228-
229-
- name: Install deps
230-
run: pnpm install
231-
env:
232-
CYPRESS_INSTALL_BINARY: 0
233-
234-
- name: Generate code
235-
run: |
236-
pnpm run generate:locales
237-
pnpm run generate:api-docs
238-
239-
- name: Check diff
240-
id: diff
241-
run: |
242-
git add .
243-
git diff --cached --exit-code
244-
continue-on-error: true
245-
246-
- name: Transpile ts
247-
run: pnpm exec tsc .github/workflows/commentCodeGeneration.ts --outDir .github/workflows
248-
249-
- name: Comment
250-
uses: actions/github-script@v6
251-
with:
252-
script: |
253-
const script = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.js')
254-
await script(github, context, ${{ steps.diff.outcome == 'success' }})
255-
256-
- name: Status
257-
if: ${{ steps.diff.outcome == 'failure' }}
258-
run: exit 1

.github/workflows/pr.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: PR
2+
3+
on:
4+
pull_request:
5+
6+
permissions:
7+
contents: read # to fetch code (actions/checkout)
8+
9+
jobs:
10+
check-code-generation:
11+
runs-on: ubuntu-latest
12+
name: 'Check Code Generation: node-18, ubuntu-latest'
13+
permissions:
14+
pull-requests: write
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Install pnpm
22+
uses: pnpm/[email protected]
23+
with:
24+
version: 7
25+
26+
- name: Set node version to 18
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
cache: 'pnpm'
31+
32+
- name: Install deps
33+
run: pnpm install
34+
env:
35+
CYPRESS_INSTALL_BINARY: 0
36+
37+
- name: Generate code
38+
run: |
39+
pnpm run generate:locales
40+
pnpm run generate:api-docs
41+
42+
- name: Check diff
43+
id: diff
44+
run: |
45+
git add .
46+
git diff --cached --exit-code
47+
continue-on-error: true
48+
49+
- name: Transpile ts
50+
run: pnpm exec tsc .github/workflows/commentCodeGeneration.ts --outDir .github/workflows
51+
52+
- name: Comment
53+
uses: actions/github-script@v6
54+
with:
55+
script: |
56+
const script = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.js')
57+
await script(github, context, ${{ steps.diff.outcome == 'success' }})
58+
59+
- name: Status
60+
if: ${{ steps.diff.outcome == 'failure' }}
61+
run: exit 1

0 commit comments

Comments
 (0)