-
Notifications
You must be signed in to change notification settings - Fork 331
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: parallelize codecheck (#9983)
Signed-off-by: Matt Krick <matt.krick@gmail.com>
- Loading branch information
Showing
3 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
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
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 |
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
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