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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
pull_request:

jobs:
frontend:
name: Frontend (lint, typecheck, test)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Install dependencies
working-directory: dashboard
run: npm ci
- name: Run lint
working-directory: dashboard
run: npm run lint
- name: TypeScript check (build)
working-directory: dashboard
run: npm run build
- name: Run tests
working-directory: dashboard
run: npm test --silent

rust:
name: Rust (fmt check, tests)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Check formatting
working-directory: contract
run: |
rustup component add rustfmt || true
cargo fmt --all -- --check
- name: Run tests
working-directory: contract
run: cargo test --workspace --all-features --verbose
6 changes: 6 additions & 0 deletions dashboard/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules
dist
build
coverage
/.cache
*.log
20 changes: 20 additions & 0 deletions dashboard/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
module.exports = {
root: true,
parser: '@typescript-eslint/parser',
parserOptions: {
ecmaVersion: 2020,
sourceType: 'module',
ecmaFeatures: { jsx: true }
},
plugins: ['@typescript-eslint', 'react'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react/recommended'
],
settings: { react: { version: 'detect' } },
env: { browser: true, es2021: true, node: true, jest: true },
rules: {
'react/react-in-jsx-scope': 'off'
}
};
5 changes: 5 additions & 0 deletions dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "node ./node_modules/typescript/bin/tsc --noEmit && node ./node_modules/vite/bin/vite.js build",
"preview": "node ./node_modules/vite/bin/vite.js preview",
"dev": "node ./node_modules/vite/bin/vite.js",
"lint": "eslint 'src/**/*.{ts,tsx}' --max-warnings=0",
"test": "node ./node_modules/jest/bin/jest.js",
"benchmark": "node ./node_modules/jest/bin/jest.js src/benchmark"
},
Expand All @@ -17,6 +18,10 @@
"zustand": "^5.0.6"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"eslint": "^8.46.0",
"eslint-plugin-react": "^7.33.0",
"@testing-library/react": "^16.3.0",
"@testing-library/user-event": "^14.6.1",
"@types/jest": "^29.5.14",
Expand Down
Loading