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

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
typecheck:
name: Typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: pnpm --filter @errin/mobile typecheck

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v4

- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm

- run: pnpm install --frozen-lockfile

- run: pnpm --filter @errin/core test
2 changes: 1 addition & 1 deletion apps/mobile/components/LanguagePairSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export function LanguagePairSelector() {
{dictionaries.map((dict) => {
const langPair: LanguagePair = { sourceLang: dict.sourceLang, targetLang: dict.targetLang };
const isActive =
effectivePair &&
!!effectivePair &&
effectivePair.sourceLang === dict.sourceLang &&
effectivePair.targetLang === dict.targetLang;
const studiedLang = activePair?.studiedLang ?? dict.targetLang;
Expand Down
2 changes: 1 addition & 1 deletion apps/mobile/store/settingsSlice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface SettingsSlice {

const DEFAULT_SETTINGS = {
dailyReviewLimit: 20,
lastActivePair: null,
lastActivePair: null as LanguagePair | null,
lookupDirection: 'studied_to_native' as LookupDirection,
};

Expand Down
5 changes: 3 additions & 2 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
"test": "jest --config jest.config.js"
},
"devDependencies": {
"@types/jest": "^30.0.0",
"jest": "^30.4.2",
"@types/jest": "^29.0.0",
"@types/node": "^22.0.0",
"jest": "^29.0.0",
"ts-jest": "^29.4.11"
}
}
2 changes: 1 addition & 1 deletion packages/core/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"esModuleInterop": true,
"skipLibCheck": true,
"forceConsistentCasingInFileNames": true,
"types": ["jest"]
"types": ["jest", "node"]
},
"include": ["src/**/*"],
"exclude": ["node_modules"]
Expand Down
Loading
Loading