infra(unicorn): prefer-optional-catch-binding #5143
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: PR | |
on: | |
pull_request: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
check-code-generation: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
name: 'Check Code Generation: node-20, ubuntu-latest' | |
permissions: | |
pull-requests: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 | |
with: | |
fetch-depth: 0 | |
- name: Install pnpm | |
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0 | |
- name: Set node version to 20 | |
uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install deps | |
run: pnpm install | |
env: | |
CYPRESS_INSTALL_BINARY: 0 | |
- name: Generate code | |
id: generate | |
run: | | |
pnpm run generate:locales | |
pnpm run generate:api-docs | |
pnpm run build | |
pnpm run test -u | |
continue-on-error: true | |
- name: Check diff | |
id: diff | |
run: | | |
git add . | |
git diff --cached --exit-code | |
continue-on-error: true | |
- name: Transpile ts | |
run: pnpm exec tsc .github/workflows/commentCodeGeneration.ts --outDir .github/workflows | |
- name: Comment | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 | |
with: | |
script: | | |
const script = require('${{ github.workspace }}/.github/workflows/commentCodeGeneration.js') | |
await script(github, context, ${{ steps.generate.outcome == 'success' && steps.diff.outcome == 'success' }}) | |
- name: Status | |
if: ${{ steps.generate.outcome == 'failure' || steps.diff.outcome == 'failure' }} | |
run: exit 1 |