-
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
Showing
21 changed files
with
507 additions
and
301 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,29 +1,81 @@ | ||
name: Node.js CI | ||
name: 'CI' | ||
|
||
on: [push] | ||
on: [ push ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
build_node: | ||
name: "Build" | ||
strategy: | ||
matrix: | ||
node-version: [22.x] | ||
runtime: [ 'Node.js v22' ] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
- name: 'Clone repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Install Node.js' | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: '22' | ||
cache: 'npm' | ||
- run: npm install | ||
- run: npm run lint | ||
- run: npm run test:ci | ||
- name: Publish coverage badge | ||
|
||
- name: 'npm ci' | ||
run: npm ci | ||
|
||
- name: 'npm run check-types' | ||
run: npm run check-types | ||
|
||
- name: 'npm run lint' | ||
run: npm run lint | ||
|
||
- name: 'npm run test' | ||
run: npm run test:ci | ||
# todo: convert test:ci to a convention for env var detection "e.g. CI=true" | ||
|
||
- name: 'Publish coverage badge' | ||
uses: wjervis7/vitest-badge-action@v1.0.0 | ||
with: | ||
result-type: lines | ||
gist-token: ${{ secrets.RELEASE_PLEASE_TOKEN }} # if you want to upload badge to gist | ||
gist-url: https://gist.github.com/dirkluijk/db6fbd0d0d4c138655a89386c5bdbe41 | ||
upload-badge: ${{ github.ref == 'refs/heads/main' }} | ||
badge-text: 'coverage' | ||
|
||
build_deno: | ||
name: "Build" | ||
strategy: | ||
matrix: | ||
runtime: [ 'Deno v2' ] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
||
permissions: | ||
id-token: write # Needed for auth with Deno Deploy | ||
contents: read # Needed to clone the repository | ||
|
||
steps: | ||
- name: 'Clone repository' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Install Deno' | ||
uses: denoland/setup-deno@v2 | ||
with: | ||
deno-version: v2.x | ||
|
||
- name: 'deno install' | ||
run: deno install | ||
|
||
- name: 'deno check' | ||
run: deno check **/*.ts | ||
|
||
- name: 'deno lint' | ||
run: deno run lint | ||
|
||
- name: 'deno test' | ||
# todo: use "deno run test:ci" when released: | ||
# https://github.com/denoland/deno/pull/26836 | ||
run: deno run 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
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
Oops, something went wrong.