-
Notifications
You must be signed in to change notification settings - Fork 2
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
Showing
3 changed files
with
84 additions
and
40 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,30 @@ | ||
|
||
name: Deno Tests | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
tests-deno: | ||
name: Run Tests with Deno ${{ matrix.deno }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
deno: [ vx.x.x, v2 ] | ||
steps: | ||
|
||
# https://github.com/actions/checkout/releases | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
# https://github.com/denoland/setup-deno | ||
- name: Setup Deno | ||
uses: denoland/[email protected] | ||
with: | ||
deno-version: ${{ matrix.deno }} | ||
|
||
- name: Install Deps | ||
run: deno install | ||
|
||
- name: Run Tests | ||
run: deno task test |
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,48 @@ | ||
|
||
name: Node Tests | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
|
||
tests: | ||
name: Run Tests with Node.js ${{ matrix.node }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ lts/*, latest, 16, 18, 20, 22 ] | ||
steps: | ||
|
||
# https://github.com/actions/cache/blob/main/examples.md#node---npm | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
shell: bash | ||
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | ||
|
||
# https://github.com/actions/cache/releases | ||
- name: Use cache for npm | ||
uses: actions/[email protected] | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: npm-${{ hashFiles('package.json') }} | ||
restore-keys: npm- | ||
|
||
# https://github.com/actions/checkout/releases | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Build package-lock | ||
run: npm i --package-lock-only | ||
|
||
# https://github.com/actions/setup-node/releases | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Clean & Install Deps | ||
run: npm ci | ||
|
||
- name: Run Tests | ||
run: npm test |
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 |
---|---|---|
|
@@ -17,44 +17,10 @@ on: | |
|
||
jobs: | ||
|
||
tests: | ||
name: Run Tests with Node.js ${{ matrix.node }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node: [ lts/*, latest, 16, 18, 20 ] | ||
steps: | ||
run-tests-node: | ||
name: Node Tests | ||
uses: ./.github/workflows/run-tests-node.yml | ||
|
||
# https://github.com/actions/cache/blob/main/examples.md#node---npm | ||
- name: Get npm cache directory | ||
id: npm-cache-dir | ||
shell: bash | ||
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT} | ||
|
||
# https://github.com/actions/cache/releases | ||
- name: Use cache for npm | ||
uses: actions/[email protected] | ||
id: npm-cache | ||
with: | ||
path: ${{ steps.npm-cache-dir.outputs.dir }} | ||
key: npm-${{ hashFiles('package.json') }} | ||
restore-keys: npm- | ||
|
||
# https://github.com/actions/checkout/releases | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
|
||
- name: Build package-lock | ||
run: npm i --package-lock-only | ||
|
||
# https://github.com/actions/setup-node/releases | ||
- name: Setup Node.js | ||
uses: actions/[email protected] | ||
with: | ||
node-version: ${{ matrix.node }} | ||
|
||
- name: Clean & Install Deps | ||
run: npm ci | ||
|
||
- name: Run Tests | ||
run: npm test | ||
run-tests-deno: | ||
name: Deno Tests | ||
uses: ./.github/workflows/run-tests-deno.yml |