Skip to content
Open
Show file tree
Hide file tree
Changes from 5 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: 0 additions & 16 deletions .github/pr-title-checker.json

This file was deleted.

31 changes: 25 additions & 6 deletions .github/workflows/android-build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ on:
paths:
- 'frontend/android/**'
- 'frontend/package.json'
- 'frontend/yarn.lock'
- 'frontend/pnpm-lock.yaml'
- '.github/workflows/android-build-validation.yml'
pull_request:
branches: [ main ]
paths:
- 'frontend/android/**'
- 'frontend/package.json'
- 'frontend/yarn.lock'
- 'frontend/pnpm-lock.yaml'
- '.github/workflows/android-build-validation.yml'

concurrency:
Expand All @@ -39,12 +39,17 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node & Cache Dependencies
uses: actions/setup-node@v6
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
cache: 'pnpm'
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Cache Gradle Wrapper
uses: actions/cache@v4
Expand All @@ -67,13 +72,26 @@ jobs:
java-version: '17'

- name: Install JS Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Grant Gradle Execute Permission
working-directory: ./frontend/android
run: chmod +x gradlew

- name: Check Google Services Secret
id: secret-check
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
if [ -z "$GOOGLE_SERVICES_JSON" ]; then
echo "has_secret=false" >> "$GITHUB_OUTPUT"
echo "Skipping Android build: GOOGLE_SERVICES_JSON secret is missing."
else
echo "has_secret=true" >> "$GITHUB_OUTPUT"
fi

- name: Inject google-services.json
if: steps.secret-check.outputs.has_secret == 'true'
env:
GOOGLE_SERVICES_JSON: ${{ secrets.GOOGLE_SERVICES_JSON }}
run: |
Expand Down Expand Up @@ -104,11 +122,12 @@ jobs:
"

- name: Compile Android Debug Build
if: steps.secret-check.outputs.has_secret == 'true'
working-directory: ./frontend/android
run: ./gradlew assembleDebug --console=plain

- name: Upload APK Artifact (On Failure)
if: failure()
if: failure() && steps.secret-check.outputs.has_secret == 'true'
uses: actions/upload-artifact@v4
with:
name: android-build-logs
Expand Down
113 changes: 51 additions & 62 deletions .github/workflows/frontend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,39 +24,8 @@ env:
NODE_VERSION: "20"

jobs:
setup:
name: Install Dependencies
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
run:
working-directory: ./frontend

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

- name: Setup Node & Cache Yarn Store
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "yarn"
cache-dependency-path: frontend/yarn.lock

- name: Cache node_modules
id: node-cache
uses: actions/cache@v4
with:
path: frontend/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}

- name: Install Dependencies
if: steps.node-cache.outputs.cache-hit != 'true'
run: yarn install --frozen-lockfile

lint:
name: Lint
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
Expand All @@ -69,23 +38,26 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Restore node_modules
uses: actions/cache@v4
with:
path: frontend/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run ESLint
run: yarn lint
run: pnpm lint

typecheck:
name: Typecheck
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
Expand All @@ -98,23 +70,26 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Restore node_modules
uses: actions/cache@v4
with:
path: frontend/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run TypeScript Check
run: yarn typecheck
run: pnpm type-check

test:
name: Unit Tests
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 10
defaults:
Expand All @@ -127,23 +102,26 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Restore node_modules
uses: actions/cache@v4
with:
path: frontend/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run Unit Tests
run: yarn test
run: pnpm test

expo-doctor:
name: Expo Doctor
needs: setup
runs-on: ubuntu-latest
timeout-minutes: 5
defaults:
Expand All @@ -156,28 +134,39 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v6

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: "pnpm"
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Restore node_modules
uses: actions/cache@v4
with:
path: frontend/node_modules
key: node-modules-${{ runner.os }}-${{ hashFiles('frontend/yarn.lock') }}
- name: Install Dependencies
run: pnpm install --frozen-lockfile

- name: Run Expo Doctor
shell: bash
run: |
OUTPUT=$(npx expo-doctor 2>&1 || true)
set +e
OUTPUT=$(pnpm dlx expo-doctor 2>&1)
STATUS=$?
set -e

echo "$OUTPUT"

if echo "$OUTPUT" | grep -q "app config fields that may not be synced"; then
echo "Ignoring non-CNG warning"
if [ $STATUS -eq 0 ]; then
exit 0
fi

if echo "$OUTPUT" | grep -q "checks failed"; then
exit 1
FAIL_COUNT=$(echo "$OUTPUT" | grep -o "✖" | wc -l | tr -d '[:space:]')
if [ "$FAIL_COUNT" -eq 1 ] && echo "$OUTPUT" | grep -q "app config fields that may not be synced"; then
echo "Ignoring known non-CNG warning"
exit 0
fi

exit $STATUS
15 changes: 10 additions & 5 deletions .github/workflows/ios-build-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
paths:
- 'frontend/ios/**'
- 'frontend/package.json'
- 'frontend/yarn.lock'
- 'frontend/pnpm-lock.yaml'
- '.github/workflows/ios-build-validation.yml'
- 'frontend/app.json'
pull_request:
branches: [ main ]
paths:
- 'frontend/ios/**'
- 'frontend/package.json'
- 'frontend/yarn.lock'
- 'frontend/pnpm-lock.yaml'
- '.github/workflows/ios-build-validation.yml'
- 'frontend/app.json'

Expand All @@ -40,20 +40,25 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node & Cache Dependencies
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'yarn'
cache-dependency-path: frontend/yarn.lock
cache: 'pnpm'
cache-dependency-path: frontend/pnpm-lock.yaml

- name: Setup Ruby (for CocoaPods)
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2' # Standard for React Native

- name: Install JS Dependencies
run: yarn install --frozen-lockfile
run: pnpm install --frozen-lockfile

- name: Check Google Services Secret
id: secret-check
Expand Down
Loading
Loading