[Snyk] Security upgrade next from 13.0.0 to 14.2.7 #11
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: Check Code with Prettier | |
on: | |
pull_request: | |
branches: | |
- 'master' | |
# Cancel old builds on new commit for same workflow + branch/PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: apps | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps | |
- name: Download dependencies | |
run: | | |
npm ci | |
- name: Run prettier | |
run: |- | |
npm run test:prettier | |
# i18n is not a node package, so we handle that one separately | |
format-i18n: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
i18n | |
- name: Setup node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps | |
- name: Download dependencies | |
run: | | |
rm package.json | |
rm package-lock.json | |
npm i [email protected] prettier-plugin-sql-cst | |
- name: Run prettier | |
run: |- | |
npx prettier -c 'i18n/**/*.{js,jsx,ts,tsx,css,md,mdx,json}' | |
format-sql: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repo | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
apps/docs/pages | |
apps/docs/content | |
# Installing all dependencies takes up to three minutes, hacking around to only installing prettier+deps | |
- name: Download dependencies | |
run: | | |
rm package.json | |
rm package-lock.json | |
npm i [email protected] prettier-plugin-sql-cst | |
- name: Run prettier | |
run: |- | |
# Check mdx files which contain sql code blocks | |
grep -lr '```sql' apps/docs/{pages,content}/**/*.mdx | xargs npx prettier -c |