-
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
5e7ec93
commit c7184d9
Showing
2 changed files
with
64 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,22 @@ | ||
name: "Setup Node and PNPM" | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install pnpm | ||
uses: pnpm/action-setup@v4 | ||
with: | ||
run_install: false | ||
|
||
- name: Get pnpm store directory | ||
shell: bash | ||
run: | | ||
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | ||
- uses: actions/cache@v4 | ||
name: Setup pnpm cache | ||
with: | ||
path: ${{ env.STORE_PATH }} | ||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
restore-keys: | | ||
${{ runner.os }}-pnpm-store- |
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,42 @@ | ||
name: CI | ||
|
||
concurrency: | ||
group: "${{ github.workflow }} - ${{ github.head_ref || github.ref }}" | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test (Node ${{ matrix.node }}) | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: true | ||
matrix: | ||
node: [18, 20, 22] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup PNPM | ||
uses: ./.github/actions/setup-pnpm | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
cache: "pnpm" | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: Run test | ||
run: pnpm run test |