Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(effect): improving spans usage #39

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 7 additions & 9 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,20 +85,18 @@ module.exports = {
},
},

// Vitest
{
files: ['**/*.test.ts', '**/*.spec.ts'],
plugins: ['eslint-plugin-vitest'],
extends: [
'plugin:vitest/recommended',
],
},
// Vitest
{
files: ['**/*.test.ts', '**/*.spec.ts'],
plugins: ['eslint-plugin-vitest'],
extends: ['plugin:vitest/legacy-recommended'],
},

// Markdown
{
files: ['**/*.md'],
plugins: ['markdown'],
extends: ['plugin:markdown/recommended', 'prettier'],
extends: ['plugin:markdown/recommended-legacy', 'prettier'],
},

// Node
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/test-badges.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: ⚡ Test generate badges

on:
push:
branches:
- esbuild

jobs:
coverage-badges-generation:
name: 📣 Coverage badges generation
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 🛑 Cancel Previous Runs
uses: styfle/[email protected]

- name: ⬇️ Checkout repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 📦 Setup pnpm
uses: pnpm/action-setup@v4
with:
version: latest

- name: ⎔ Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.node-version'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
cache-dependency-path: ./package.json

- name: 📥 Install deps
run: pnpm install --frozen-lockfile

- name: 🔍 Tests
run: pnpm test-ci

- name: ⚙️ Generating coverage badges
uses: jpb06/[email protected]
with:
branches: esbuild
badges-icon: vitest
5 changes: 0 additions & 5 deletions .vscode/effect.code-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,4 @@
"body": ["import { pipe, Effect } from 'effect'"],
"description": "Import effect and pipe",
},
"Scope effect with span": {
"prefix": "wsp",
"body": ["Effect.withSpan(__filename)("],
"description": "Create a span",
},
}
18 changes: 15 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
{
"eslint.run": "onSave",
"eslint.experimental.useFlatConfig": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
"editor.codeActionsOnSave": ["source.formatDocument", "source.fixAll.eslint"],
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[properties]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
},
"editor.tabSize": 2
"[jsonc]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[json]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[ignore]": {
"editor.defaultFormatter": "foxundermoon.shell-format"
}
}
2 changes: 1 addition & 1 deletion badges/coverage-branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion badges/coverage-functions.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion badges/coverage-lines.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading