-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(practs): bump practs to latest best
- Loading branch information
1 parent
b8a298c
commit 18937d9
Showing
10 changed files
with
2,680 additions
and
4,041 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
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,2 @@ | ||
# exclude package-lock from git diff; https://stackoverflow.com/a/72834452/3068233 | ||
package-lock.json -diff |
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: .install | ||
|
||
on: | ||
workflow_call: | ||
outputs: | ||
node-modules-cache-key: | ||
description: a max(stable) cache key to the node modules of this commit's dependencies | ||
value: ${{ jobs.npm.outputs.node-modules-cache-key }} | ||
|
||
jobs: | ||
npm: | ||
runs-on: ubuntu-20.04 | ||
outputs: | ||
node-modules-cache-key: ${{ steps.cache.outputs.cache-primary-key }} | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: set node-version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: '.nvmrc' | ||
|
||
- name: node-modules deps hash | ||
id: deps-hash | ||
run: | | ||
PACKAGE_DEPS_HASH=$(jq '.packages' package-lock.json | jq 'del(."".version)' | md5sum | awk '{print $1}'); | ||
echo "PACKAGE_DEPS_HASH=$PACKAGE_DEPS_HASH" | ||
echo "package-deps-hash=$PACKAGE_DEPS_HASH" >> "$GITHUB_OUTPUT" | ||
- name: node-modules cache get | ||
uses: actions/cache/restore@v4 | ||
id: cache | ||
with: | ||
path: ./node_modules | ||
key: ${{ runner.os }}-node-${{ steps.deps-hash.outputs.package-deps-hash }} | ||
|
||
- name: node-modules cache miss install | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
run: npm ci --ignore-scripts --prefer-offline --no-audit | ||
|
||
- name: node-modules cache set | ||
if: steps.cache.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: ./node_modules | ||
key: ${{ steps.cache.outputs.cache-primary-key }} |
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
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,4 @@ | ||
#!/bin/bash | ||
|
||
# if exists a .nvmrc, then `nvm use`, to use the specified version | ||
[[ -f ".nvmrc" ]] && nvm use |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/bin/sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
. "$(dirname -- "$0")/check.nvm.sh" | ||
. "$(dirname -- "$0")/check.lockfile.sh" |
Oops, something went wrong.