-
-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
ac25c68
commit d314d88
Showing
1 changed file
with
36 additions
and
14 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 |
---|---|---|
@@ -1,22 +1,44 @@ | ||
name: Build | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
Build: | ||
test: | ||
name: Test Node.js ${{ matrix.node-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
node-version: | ||
- 18 | ||
- 22 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install pnpm | ||
uses: pnpm/action-setup@v3 | ||
id: pnpm-install | ||
with: | ||
version: 9.12.2 | ||
run_install: false | ||
|
||
- uses: actions/setup-node@v3 | ||
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
|
||
- run: yarn install --frozen-lockfile | ||
- name: build | ||
# TODO Enable those lines below if you use a Redis cache, you'll also need to configure GitHub Repository Secrets | ||
# env: | ||
# REDIS_HOST: ${{ secrets.REDIS_HOST }} | ||
# REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | ||
run: yarn build | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
|
||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile --strict-peer-dependencies | ||
|
||
- name: Run test | ||
run: pnpm test | ||
|
||
# TODO Enable those lines below if you use a Redis cache, you'll also need to configure GitHub Repository Secrets | ||
# env: | ||
# REDIS_HOST: ${{ secrets.REDIS_HOST }} | ||
# REDIS_PASSWORD: ${{ secrets.REDIS_PASSWORD }} | ||
# - name: Build | ||
# run: pnpm build |