Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: parallelize codecheck #9983

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/style-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Style Check
on:
push:
branches-ignore:
- "release-please--**"
- "release/v**"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
style-check:
runs-on: ubuntu-latest
permissions:
contents: "read"
id-token: "write"
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version-file: package.json
# Caching yarn dir & running yarn install is too slow
# Instead, we aggressively cache node_modules below to avoid calling install

- name: Setup environment variables
run: |
NODE_VERSION=$(jq -r -j '.engines.node|ltrimstr("^")' package.json)
echo NODE_VERSION=$NODE_VERSION >> $GITHUB_ENV
echo NODE_VERSION=$NODE_VERSION

- name: Get cached node modules
id: cache
uses: actions/cache@v3
with:
path: |
**/node_modules
key: node_modules-${{ runner.arch }}-${{ env.NODE_VERSION }}-${{ hashFiles('yarn.lock') }}

- name: Install node_modules
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --immutable

- name: Check Code Quality
run: yarn codecheck
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ jobs:
- name: Kysely Codegen
run: yarn pg:generate

- name: Check Code Quality
run: yarn codecheck
- name: Typecheck
run: yarn typecheck

- name: Run server tests
run: yarn test:server -- --reporters=default --reporters=jest-junit
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"typecheck": "nx run-many --target=typecheck",
"lintcheck": "nx run-many --target=lint:check",
"stylecheck": "nx run-many --target=prettier:check",
"codecheck": "concurrently --names \"typecheck,lintcheck,stylecheck\" \"yarn typecheck\" \"yarn lintcheck\" \"yarn stylecheck\" ",
"codecheck": "concurrently --names \"lintcheck,stylecheck\" \"yarn lintcheck\" \"yarn stylecheck\" ",
"ultrahook": "export $(grep ^ULTRAHOOK_API_KEY .env | tr -d \"'\") && ultrahook -k $ULTRAHOOK_API_KEY dev 3000",
"precommit": "nx run-many --target=precommit --parallel=1",
"postcheckout": "node scripts/generateGraphQLArtifacts.js &>/dev/null &",
Expand Down
Loading