Skip to content
Merged
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: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
## Problem

_Describe the problem this PR solves_

## Solution

_Describe the solution this PR implements_

## How To Test

_Describe the steps required to test the changes_

## Additional Checks

- [ ] The PR includes **unit tests** (if not possible, describe why)
- [ ] The **documentation** is up to date
98 changes: 98 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: 'Check'

on:
push:
branches:
- main
pull_request:

jobs:
lint:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '24.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run Biome lint
run: pnpm turbo run lint:check

typecheck:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '24.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Run TypeScript type check
run: pnpm turbo run typecheck

test:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '24.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install dependencies
run: pnpm playwright install chromium chromium-headless-shell

- name: Run Tests
run: pnpm turbo run test

e2e:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '24.x'

- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Install dependencies
run: pnpm playwright install chromium chromium-headless-shell

- name: Run Tests
run: pnpm turbo run e2e
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,10 @@
**/*.pem
**/.env
**/*.env

# Playwright
**/test-results/
**/playwright-report/
**/blob-report/
**/playwright/.cache/
**/playwright/.auth/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm turbo run lint:apply --no-cache
9 changes: 8 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"source.organizeImports.biome": "always",
"source.removeUnusedImports": "always"
},
"[css]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[tailwindcss]": {
"editor.defaultFormatter": "biomejs.biome"
},
"[json]": {
"editor.defaultFormatter": "biomejs.biome"
},
Expand All @@ -22,5 +28,6 @@
"**/.DS_Store": true,
"**/.turbo": true,
"**/node_modules": true
}
},
"typescript.preferences.autoImportSpecifierExcludeRegexes": ["node:test"]
}
117 changes: 0 additions & 117 deletions agents.md

This file was deleted.

4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"$schema": "https://biomejs.dev/schemas/2.3.8/schema.json",
"files": {
"includes": [
"*.{json,md,yaml}",
"*.{json,md,ts,yaml}",
".github/**/*.{yml,md}",
".vscode/*.json",
"packages/**/*.{json,ts,tsx}",
"{e2e,packages}/**/*.{css,json,ts,tsx}",
"!packages/**/dist/*.{js,ts}"
]
},
Expand Down
21 changes: 18 additions & 3 deletions makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,26 @@ test: ## Run Unit tests
test-watch: ## Run Unit tests in watch mode
@pnpm turbo watch test:watch

test-browser: ## Run Unit tests in browser mode
@pnpm turbo run test:browser

test-browser-react-tei: ## Run demo React TEI in browser mode
@pnpm turbo run test:browser --filter="@istex/react-tei"

test-browser-demo: ## Run demo tests in browser mode
@pnpm turbo run test:browser --filter="@istex/viewer-demo"

e2e:
@pnpm turbo run e2e --no-cache

e2e-ui:
@(DEV=1 pnpm playwright test --ui)

typecheck: ## Run type checks
@pnpm turbo run typecheck
@pnpm turbo run typecheck --no-cache

lint-check: ## Run lint checks
@pnpm turbo run lint:check
@pnpm turbo run lint:check --no-cache

lint-apply: ## Apply lint fixes
@pnpm turbo run lint:apply
@pnpm turbo run lint:apply --no-cache
19 changes: 6 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,18 @@
],
"scripts": {
"lint:apply": "biome check --write",
"lint:check": "biome check"
"lint:check": "biome check",
"prepare": "husky",
"typecheck": "tsc --noEmit tsconfig.e2e.json"
},
"private": true,
"dependencies": {},
"devDependencies": {
"@biomejs/biome": "catalog:",
"@playwright/test": "^1.57.0",
"@types/node": "catalog:",
"@types/react": "catalog:",
"@types/react-dom": "catalog:",
"@vitejs/plugin-react": "catalog:",
"@vitest/browser-playwright": "catalog:",
"@vitest/coverage-v8": "catalog:",
"husky": "catalog:",
"playwright": "catalog:",
"turbo": "catalog:",
"typescript": "catalog:",
"vite": "catalog:",
"vite-plugin-devtools-json": "catalog:",
"vite-tsconfig-paths": "catalog:",
"vitest": "catalog:"
"turbo": "catalog:"
},
"packageManager": "pnpm@10.25.0+sha512.5e82639027af37cf832061bcc6d639c219634488e0f2baebe785028a793de7b525ffcd3f7ff574f5e9860654e098fe852ba8ac5dd5cefe1767d23a020a92f501"
}
24 changes: 0 additions & 24 deletions packages/demo/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion packages/demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>demo</title>
</head>
Expand Down
Loading