Skip to content

Colota - Android GPS Location tracker

Add npm run build -w @colota/shared to lint-test, build-release, and build-latest-release workflows Fix prev parameter type in useTheme.tsx (TS7006) Add docs-check workflow for PR validation

Max Dietricha976dc4178a7
diff --git a/.github/workflows/build-latest-release.yml b/.github/workflows/build-latest-release.yml
index 2a9e039b..719abaf9 100644
--- a/.github/workflows/build-latest-release.yml
+++ b/.github/workflows/build-latest-release.yml
@@ -25,6 +25,7 @@ jobs:
node-version: '20'
cache: 'npm'
- run: npm ci
+ - run: npm run build -w @colota/shared
- run: npm run lint -w @colota/mobile
- run: npx -w @colota/mobile tsc --noEmit
- run: npm test -w @colota/mobile
diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml
index 6936a9de..936ad5f7 100644
--- a/.github/workflows/build-release.yml
+++ b/.github/workflows/build-release.yml
@@ -23,6 +23,7 @@ jobs:
node-version: '20'
cache: 'npm'
- run: npm ci
+ - run: npm run build -w @colota/shared
- run: npm run lint -w @colota/mobile
- run: npx -w @colota/mobile tsc --noEmit
- run: npm test -w @colota/mobile
diff --git a/.github/workflows/docs-check.yml b/.github/workflows/docs-check.yml
new file mode 100644
index 00000000..ba5fd303
--- /dev/null
+++ b/.github/workflows/docs-check.yml
@@ -0,0 +1,33 @@
+name: Docs Check
+
+on:
+ pull_request:
+ branches: [main, develop]
+ paths:
+ - 'apps/docs/**'
+ - 'packages/shared/**'
+ workflow_dispatch:
+
+jobs:
+ build:
+ name: Build Docs
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+ cache: 'npm'
+
+ - name: Install dependencies
+ run: npm ci
+
+ - name: Build shared package
+ run: npm run build -w @colota/shared
+
+ - name: Build docs
+ run: npm run build -w @colota/docs
diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml
index 79465958..d8de3322 100644
--- a/.github/workflows/lint-test.yml
+++ b/.github/workflows/lint-test.yml
@@ -29,6 +29,9 @@ jobs:
- name: Install dependencies
run: npm ci
+ - name: Build shared package
+ run: npm run build -w @colota/shared
+
- name: Run ESLint
run: npm run lint -w @colota/mobile
diff --git a/apps/mobile/src/hooks/useTheme.tsx b/apps/mobile/src/hooks/useTheme.tsx
index f9192e5c..1b9dc22d 100644
--- a/apps/mobile/src/hooks/useTheme.tsx
+++ b/apps/mobile/src/hooks/useTheme.tsx
@@ -62,7 +62,7 @@ export const ThemeProvider = ({ children }: { children: ReactNode }) => {
*/
const toggleTheme = useCallback(() => {
setHasManualOverride(true)
- setMode((prev) => (prev === "light" ? "dark" : "light"))
+ setMode((prev: string) => (prev === "light" ? "dark" : "light"))
}, [])
const colors = useMemo(() => (mode === "dark" ? darkColors : lightColors), [mode])