Skip to content

Setup/ci #3

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

Merged
merged 3 commits into from
Jun 11, 2025
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
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
pull_request:
branches:
- '**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'pnpm'

- name: Install dependencies
run: pnpm install

- name: Run format check on modified files
run: pnpm run format:check

- name: Run lint on modified files
run: pnpm run lint

- name: Run tests
run: pnpm run test
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pnpm-lock.yaml
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@
"typescript",
"typescriptreact"
],
"typescript.tsdk": "node_modules/typescript/lib"
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# New pyronear platform


## Local setup

Use `fnm` to ensure you always use the correct node version:
Expand All @@ -27,4 +26,4 @@ You should now be able to run the website locally with

```bash
pnpm run dev
```
```
15 changes: 9 additions & 6 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ import reactDom from 'eslint-plugin-react-dom';
import simpleImportSort from 'eslint-plugin-simple-import-sort';

export default tseslint.config(
{ ignores: ['dist', 'node_modules/', '*.test.js'] },
{
ignores: ['dist', 'node_modules/', 'eslint.config.js', '*.md', '*.json'],
},
{
extends: [
js.configs.recommended,
...tseslint.configs.strictTypeChecked,
...tseslint.configs.stylisticTypeChecked,
],
files: ['**/*.{ts,tsx}'],
ignores: ['vite.config.ts', 'eslint.config.js'],
ignores: [],
languageOptions: {
parserOptions: {ecmaVersion: 2020,
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
project: "./tsconfig.json",
project: './tsconfig.json',
tsconfigRootDir: import.meta.dirname,
},
},
Expand All @@ -48,8 +51,8 @@ export default tseslint.config(
'padding-line-between-statements': [
'error',
{ blankLine: 'always', prev: 'import', next: '*' },
{ blankLine: 'any', prev: 'import', next: 'import' }
]
{ blankLine: 'any', prev: 'import', next: 'import' },
],
},
}
);
12 changes: 9 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@
"scripts": {
"dev": "vite",
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint": "eslint . --no-warn-ignored",
"preview": "vite preview",
"format": "prettier --write \"src/**/*.{ts,tsx,js,jsx,json,css,scss,md,html}\""
"format": "prettier . --write",
"format:check": "prettier . --check",
"test": "vitest --passWithNoTests"
},
"dependencies": {
"@emotion/react": "^11.14.0",
Expand All @@ -21,6 +23,8 @@
},
"devDependencies": {
"@eslint/js": "^9.25.0",
"@testing-library/jest-dom": "^6.6.3",
"@testing-library/react": "^16.3.0",
"@types/react": "^19.1.2",
"@types/react-dom": "^19.1.2",
"@typescript-eslint/eslint-plugin": "^8.32.1",
Expand All @@ -37,11 +41,13 @@
"eslint-plugin-react-x": "^1.49.0",
"eslint-plugin-simple-import-sort": "^12.1.1",
"globals": "^16.0.0",
"jsdom": "^26.1.0",
"prettier": "^3.5.3",
"typescript": "~5.8.3",
"typescript-eslint": "^8.30.1",
"vite": "^6.3.5",
"vite-plugin-checker": "^0.9.3",
"vite-plugin-eslint": "^1.8.1"
"vite-plugin-eslint": "^1.8.1",
"vitest": "^3.2.2"
}
}
Loading