-
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.
- Loading branch information
1 parent
7e1ab56
commit dd40ca6
Showing
4 changed files
with
56 additions
and
0 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,17 @@ | ||
name: Setup node_modules | ||
description: Restores or reinstall the node_modules cache | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Trying to pull node_modules | ||
id: cache-node-modules | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.repository }}-node-modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies if cache is not found | ||
if: steps.cache-node-modules.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: npm ci --ignore-scripts |
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,11 @@ | ||
name: Pull node_modules | ||
description: Pulls the node_modules cache | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Pull node_modules | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: node_modules | ||
key: ${{ runner.os }}-${{ github.repository }}-node-modules-${{ hashFiles('package-lock.json') }} |
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,15 @@ | ||
name: Setup Node.js | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Read Node.js version from .nvmrc | ||
id: read-version | ||
run: | | ||
NODE_VERSION=$(cat .nvmrc | sed 's/^v//') | ||
echo "node-version=$NODE_VERSION" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Use Node.js ${{ env.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.node-version }} |
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,13 @@ | ||
name: Build check | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
install-deps: | ||
name: Install dependencies | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setup-node | ||
- uses: ./.github/actions/install-npm-deps |