diff --git a/.github/workflows/build-android.yml b/.github/workflows/build-android.yml new file mode 100644 index 0000000..2cbb658 --- /dev/null +++ b/.github/workflows/build-android.yml @@ -0,0 +1,36 @@ +name: Build and Submit Android App + +on: + workflow_dispatch: + push: + branches: + - "main" + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "21" + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Build Android App + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bun run --filter @scheduli/mobile build:android + + - name: Submit Android App + if: github.ref == 'refs/heads/main' + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bun run --filter @scheduli/mobile submit:android diff --git a/.github/workflows/build-ios.yml b/.github/workflows/build-ios.yml new file mode 100644 index 0000000..4b65aa0 --- /dev/null +++ b/.github/workflows/build-ios.yml @@ -0,0 +1,31 @@ +name: Build and Submit iOS App + +on: + workflow_dispatch: + push: + branches: + - "main" + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Build iOS App + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bun run --filter @scheduli/mobile build:ios + + - name: Submit iOS App + if: github.ref == 'refs/heads/main' + env: + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bun run --filter @scheduli/mobile submit:ios diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..d1f6177 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,21 @@ +name: Lint + +on: + workflow_dispatch: + pull_request: + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Run lint + run: bun run lint diff --git a/.github/workflows/test-android.yml b/.github/workflows/test-android.yml new file mode 100644 index 0000000..7db2c32 --- /dev/null +++ b/.github/workflows/test-android.yml @@ -0,0 +1,30 @@ +name: Build Android App + +on: + workflow_dispatch: + pull_request: + +jobs: + build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v6 + + - uses: actions/setup-java@v4 + with: + distribution: "temurin" + java-version: "21" + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Build Android Simulator App + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: dsnss-projects + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bunx turbo run build:android:simulator diff --git a/.github/workflows/test-ios.yml b/.github/workflows/test-ios.yml new file mode 100644 index 0000000..d40b286 --- /dev/null +++ b/.github/workflows/test-ios.yml @@ -0,0 +1,62 @@ +name: Test iOS App + +on: + workflow_dispatch: + pull_request: + +jobs: + test: + runs-on: macos-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Install Maestro + run: | + curl -fsSL "https://get.maestro.mobile.dev" | bash + echo "$HOME/.maestro/bin" >> $GITHUB_PATH + + - name: Build iOS Simulator App + env: + TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} + TURBO_TEAM: dsnss-projects + EXPO_TOKEN: ${{ secrets.EXPO_TOKEN }} + run: bunx turbo run build:ios:simulator + + - uses: futureware-tech/simulator-action@v4 + with: + model: "iPhone 17 Pro" + wait_for_boot: true + + - name: Install iOS App + run: bun run --filter @scheduli/mobile install:ios:simulator + + - name: Run iOS Tests + env: + MAESTRO_DRIVER_STARTUP_TIMEOUT: 120000 + run: bun run --filter @scheduli/mobile test + + - name: Create Debug Information + if: failure() + run: | + mkdir -p ./debug-info + cp -r ~/Library/Logs/DiagnosticReports/ ./debug-info/diagnostic-reports + cp -r ~/Library/Logs/CoreSimulator ./debug-info/simulator-logs + cp -r apps/mobile/.maestro/recordings ./debug-info/recordings + cp -r ~/.maestro/tests ./debug-info/maestro-logs + + - name: Upload Debug Information + if: failure() + uses: actions/upload-artifact@v6 + with: + name: debug-info + path: ./debug-info/ + if-no-files-found: ignore + retention-days: 1 diff --git a/.github/workflows/test-web.yml b/.github/workflows/test-web.yml new file mode 100644 index 0000000..72de45a --- /dev/null +++ b/.github/workflows/test-web.yml @@ -0,0 +1,33 @@ +name: Test Website + +on: + workflow_dispatch: + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + timeout-minutes: 60 + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Install Playwright Browsers + run: bun run --filter @scheduli/web test:setup + + - name: Run Playwright tests + run: bun run --filter @scheduli/web test + + - uses: actions/upload-artifact@v6 + if: failure() + with: + name: playwright-report + path: ./apps/web/playwright-report/ + if-no-files-found: ignore + retention-days: 1 diff --git a/.github/workflows/typecheck.yml b/.github/workflows/typecheck.yml new file mode 100644 index 0000000..6725922 --- /dev/null +++ b/.github/workflows/typecheck.yml @@ -0,0 +1,21 @@ +name: Typecheck + +on: + workflow_dispatch: + pull_request: + +jobs: + typecheck: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - uses: oven-sh/setup-bun@v2 + with: + bun-version: latest + + - name: Install dependencies + run: bun ci + + - name: Typecheck + run: bun run --filter @scheduli/mobile typecheck diff --git a/apps/mobile/plugins/withAddPodDepsToTargets.ts b/apps/mobile/plugins/withAddPodDepsToTargets.ts index 4df6453..b07965e 100644 --- a/apps/mobile/plugins/withAddPodDepsToTargets.ts +++ b/apps/mobile/plugins/withAddPodDepsToTargets.ts @@ -9,7 +9,8 @@ target "StatusWidget" do use_frameworks! :linkage => podfile_properties['ios.useFrameworks'].to_sym if podfile_properties['ios.useFrameworks'] use_frameworks! :linkage => ENV['USE_FRAMEWORKS'].to_sym if ENV['USE_FRAMEWORKS'] - pod "MMKVAppExtension" + pod "MMKVAppExtension", "2.4.0" + pod "MMKVCore", "2.4.0" end `; diff --git a/apps/mobile/scripts/maestro-test.sh b/apps/mobile/scripts/maestro-test.sh old mode 100644 new mode 100755