Skip to content

Commit

Permalink
Merge pull request #6 from yukukotani/biome-conf
Browse files Browse the repository at this point in the history
add lint workflows
  • Loading branch information
yukukotani authored Oct 19, 2024
2 parents f493a70 + 637aaf4 commit 3ed7123
Show file tree
Hide file tree
Showing 10 changed files with 327 additions and 64 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on:
pull_request:
push:
branches:
- main

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Biome
uses: biomejs/setup-biome@v2
- name: Run Biome
run: biome ci .
54 changes: 54 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Test

on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
branch:
- ${{ github.head_ref }}
- "main"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: pnpm install
shell: bash
run: |
pnpm install --frozen-lockfile
- name: Run test
run: pnpm run test:coverage
- name: "Upload Coverage"
uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.branch }}
path: coverage
report-coverage:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: "Download Coverage Artifacts"
uses: actions/download-artifact@v4
with:
name: coverage-${{ github.head_ref }}
path: coverage
- uses: actions/download-artifact@v4
with:
name: coverage-main
path: coverage-main
- name: "Report Coverage"
uses: davelosert/vitest-coverage-report-action@v2
with:
json-summary-compare-path: coverage-main/coverage-summary.json
27 changes: 27 additions & 0 deletions .github/workflows/type-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: TypeCheck

on:
pull_request:
push:
branches:
- main

jobs:
type-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: pnpm install
shell: bash
run: |
pnpm install --frozen-lockfile
- name: Run tsc
run: pnpm run check:tsc
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/

dist/
coverage/
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,22 @@
"fix": "biome check --write ./",
"test": "vitest run",
"test:watch": "vitest --watch",
"test:coverage": "vitest run --coverage.enabled true",
"prepublish": "pnpm run build"
},
"dependencies": {
"@sindresorhus/fnv1a": "^3.1.0",
"csstype": "^3.1.3"
},
"devDependencies": {
"@biomejs/biome": "^1.9.3",
"@biomejs/biome": "^1.9.4",
"@testing-library/jest-dom": "^6.5.0",
"@testing-library/react": "^16.0.1",
"@types/jsdom": "^21.1.7",
"@types/react": "^18",
"@types/react-dom": "^18",
"@vitejs/plugin-react": "^4.3.2",
"@vitest/coverage-v8": "2.1.2",
"jsdom": "^25.0.1",
"react": "19.0.0-rc-f994737d14-20240522",
"react-dom": "19.0.0-rc-f994737d14-20240522",
Expand All @@ -45,6 +47,10 @@
"react": "^19.0.0",
"react-dom": "^19.0.0"
},
"engines": {
"pnpm": ">=9.12.0"
},
"packageManager": "pnpm@9.12.2",
"description": "",
"keywords": ["React", "CSS-in-JS", "Next.js"],
"author": "Yuku Kotani (yukukotani@gmail.com)",
Expand Down
Loading

0 comments on commit 3ed7123

Please sign in to comment.