-
Notifications
You must be signed in to change notification settings - Fork 6
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
6b9dad6
commit da5dc77
Showing
1 changed file
with
13 additions
and
17 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,26 +1,22 @@ | ||
name: Node.js CI | ||
|
||
on: [push, pull_request] | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
test: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [21.x] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '21' | ||
|
||
- name: Install dependencies | ||
- run: npx jsr add @cross/test @std/assert | ||
- run: "echo '{ \"type\": \"module\" }' > package.json" | ||
|
||
- name: Run tests | ||
run: | | ||
find . -type f -name "*.test.ts" | while read -r file; do | ||
echo "Running tests in $file" | ||
npx --yes tsx --test $file | ||
done | ||
- run: "echo '{ \"type\": \"module\" }' > package.json" # Needed for tsx to work | ||
- run: npx --yes tsx --test *.test.ts |