-
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.
Also migrated to oxlint and vitest
- Loading branch information
Showing
17 changed files
with
5,670 additions
and
9,635 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,92 +1,46 @@ | ||
name: ci | ||
|
||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
on: | ||
push: | ||
branches: ['master'] | ||
pull_request: | ||
branches: ['master'] | ||
|
||
# Allows to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache node modules | ||
id: cache-npm | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
node_modules | ||
~/.npm | ||
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | ||
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 | ||
uses: ./.github/workflows/setup-node | ||
|
||
- name: Set Node v20 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
registry-url: https://registry.npmjs.org/ | ||
|
||
- name: Install dependencies | ||
run: npm ci | ||
- name: Generate dist | ||
run: npm run build | ||
|
||
test: | ||
needs: [build] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use node modules cache | ||
id: cache-npm | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
node_modules | ||
~/.npm | ||
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | ||
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 | ||
uses: ./.github/workflows/setup-node | ||
|
||
- name: Run tests | ||
run: npm t | ||
run: npm run test -- --coverage | ||
|
||
lint: | ||
needs: [build] | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repo | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v4 | ||
|
||
- name: Use node modules cache | ||
id: cache-npm | ||
uses: actions/cache@v4 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: | | ||
node_modules | ||
~/.npm | ||
key: ${{ runner.os }}-prepare-${{ env.cache-name }}-${{ github.sha }} | ||
- name: Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧 | ||
uses: ./.github/workflows/setup-node | ||
|
||
- name: Run linter | ||
run: npm run lint |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: setup-node | ||
description: 'Setup Node.js ⚙️ - Cache dependencies ⚡ - Install dependencies 🔧' | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Setup Node.js ⚙️ | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
|
||
- name: Cache dependencies ⚡ | ||
id: cache_dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: node_modules | ||
key: node-modules-${{ hashFiles('package-lock.json') }} | ||
|
||
- name: Install dependencies 🔧 | ||
shell: bash | ||
if: steps.cache_dependencies.outputs.cache-hit != 'true' | ||
run: npm ci |
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,3 @@ | ||
{ | ||
"singleQuote": true | ||
} |
This file was deleted.
Oops, something went wrong.
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,10 @@ | ||
{ | ||
"env": { | ||
"browser": true | ||
}, | ||
"rules": { | ||
"no-inner-declaration": "error", | ||
"no-console": "error", | ||
"no-cycle": "error" | ||
} | ||
} |
Oops, something went wrong.