-
Notifications
You must be signed in to change notification settings - Fork 7
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
1ecf192
commit ed8b9c9
Showing
9 changed files
with
489 additions
and
299 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,76 @@ | ||
name: 🚀 PR | ||
|
||
concurrency: | ||
group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: [pull_request] # Run only on pull_request, to also get status updates in PRs. We omit push because this would run the steps two times (for push and pull_request). | ||
|
||
permissions: | ||
actions: write | ||
contents: read | ||
# Required to put a comment into the pull-request | ||
pull-requests: write | ||
|
||
jobs: | ||
lint: | ||
name: ⬣ Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: biomejs/setup-biome@v2 | ||
- run: biome ci . --reporter=github | ||
|
||
typecheck: | ||
name: 🔎 Type check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "package.json" | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: 🔎 Type check | ||
run: npm run typecheck | ||
|
||
vitest: | ||
name: ⚡ Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🛑 Cancel Previous Runs | ||
uses: styfle/[email protected] | ||
|
||
- name: ⬇️ Checkout repo | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⎔ Setup node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: "package.json" | ||
|
||
- name: 📥 Download deps | ||
uses: bahmutov/npm-install@v1 | ||
with: | ||
useLockFile: false | ||
|
||
- name: Install dotenv cli | ||
run: npm install -g dotenv-cli | ||
|
||
- name: ⚡ Run vitest | ||
run: npm run test:cov | ||
|
||
- name: "Report Coverage" | ||
# Only works if you set `reportOnFailure: true` in your vite config as specified above | ||
if: always() | ||
uses: davelosert/vitest-coverage-report-action@v2 |
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,34 @@ | ||
{ | ||
"biome.enabled": true, | ||
"editor.defaultFormatter": "biomejs.biome", | ||
"editor.formatOnSave": true, | ||
"javascript.format.enable": false, | ||
"javascript.suggest.autoImports": true, | ||
"javascript.suggest.paths": true, | ||
"typescript.format.enable": false, | ||
"typescript.suggest.paths": true, | ||
"typescript.suggest.autoImports": true, | ||
"editor.renderWhitespace": "all", | ||
"editor.rulers": [120, 160], | ||
"editor.codeActionsOnSave": { | ||
"source.fixAll": "always", | ||
"source.organizeImports": "never", | ||
"source.organizeImports.biome": "always", | ||
"quickfix.biome": "always" | ||
}, | ||
"editor.insertSpaces": false, | ||
"editor.detectIndentation": true, | ||
"editor.trimAutoWhitespace": true, | ||
"files.trimTrailingWhitespace": true, | ||
"files.trimTrailingWhitespaceInRegexAndStrings": true, | ||
"files.trimFinalNewlines": true, | ||
"explorer.fileNesting.patterns": { | ||
"*.ts": "${basename}.*.${extname}", | ||
".env": ".env.*", | ||
"*.tsx": "${basename}.*.${extname},${basename}.*.ts", | ||
"package.json": "*.json, *.yml, *.config.js, *.config.ts, *.yaml" | ||
}, | ||
"eslint.enable": false, | ||
"eslint.format.enable": false, | ||
"prettier.enable": false | ||
} |
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,55 @@ | ||
{ | ||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json", | ||
"vcs": { | ||
"enabled": true, | ||
"clientKind": "git", | ||
"defaultBranch": "main", | ||
"useIgnoreFile": true | ||
}, | ||
"formatter": { | ||
"enabled": true, | ||
"formatWithErrors": false, | ||
"indentStyle": "tab", | ||
"lineEnding": "lf", | ||
"lineWidth": 120 | ||
}, | ||
"organizeImports": { | ||
"enabled": true | ||
}, | ||
"linter": { | ||
"enabled": true, | ||
"rules": { | ||
"recommended": true, | ||
"suspicious": { | ||
"recommended": true | ||
}, | ||
"style": { | ||
"recommended": true | ||
}, | ||
"complexity": { | ||
"recommended": true | ||
}, | ||
"security": { | ||
"recommended": true | ||
}, | ||
"performance": { | ||
"recommended": true | ||
}, | ||
"correctness": { | ||
"recommended": true | ||
}, | ||
"a11y": { | ||
"recommended": true | ||
}, | ||
"nursery": { | ||
"recommended": true | ||
} | ||
} | ||
}, | ||
"javascript": { | ||
"formatter": { | ||
"semicolons": "asNeeded", | ||
"trailingCommas": "es5" | ||
} | ||
} | ||
} |
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 @@ | ||
pre-commit: | ||
parallel: true | ||
commands: | ||
check: | ||
run: npm run check -- --staged --fix --no-errors-on-unmatched | ||
stage_fixed: true | ||
typecheck: | ||
run: npm run typecheck | ||
test: | ||
run: npm run test |
Oops, something went wrong.