name: '🏗️ Build and Test JellyTau' on: push: branches: - master paths-ignore: - '**/*.md' pull_request: branches: - master paths-ignore: - '**/*.md' workflow_dispatch: jobs: build: name: Build APK and Run Tests runs-on: ubuntu-latest container: image: gitea.tourolle.paris/dtourolle/jellytau-builder:latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Cache Rust dependencies uses: actions/cache@v3 with: path: | ~/.cargo/registry ~/.cargo/git src-tauri/target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} restore-keys: | ${{ runner.os }}-cargo- - name: Cache Node dependencies uses: actions/cache@v3 with: path: | ~/.bun/install/cache node_modules key: ${{ runner.os }}-bun-${{ hashFiles('**/bun.lock') }} restore-keys: | ${{ runner.os }}-bun- - name: Install dependencies run: | bun install - name: Run frontend tests run: bun test - name: Run Rust tests run: | cd src-tauri cargo test cd .. - name: Build frontend run: bun run build - name: Build Android APK id: build run: | mkdir -p artifacts bun run tauri android build --apk true # Find the generated APK file ARTIFACT=$(find src-tauri/gen/android/app/build/outputs/apk -name "*.apk" -type f -print -quit) echo "artifact=${ARTIFACT}" >> $GITHUB_OUTPUT echo "Found artifact: ${ARTIFACT}" - name: Upload build artifact uses: actions/upload-artifact@v3 with: name: jellytau-apk path: ${{ steps.build.outputs.artifact }} retention-days: 30 if-no-files-found: error