Skip to content
Closed
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
7 changes: 7 additions & 0 deletions .github/workflows/_ci-build-tauri-apps.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ jobs:
- name: 🦀 Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: 🦀 Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: '.'
cache-on-failure: true
cache-targets: false

# Install Tauri dependencies on Linux
- name: 🔧 Fix ARM64 Package Sources (Linux)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/_ci-build-tauri-e2e-app.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ jobs:
- name: 🦀 Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: 🦀 Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: '.'
cache-on-failure: true
cache-targets: false

- name: 🔧 Fix ARM64 Package Sources (Linux)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
shell: bash
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/_ci-build-tauri-package-app.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@ jobs:
- name: 🦀 Install Rust Toolchain
uses: dtolnay/rust-toolchain@stable

- name: 🦀 Rust Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: '.'
cache-on-failure: true
cache-targets: false

- name: 🔧 Fix ARM64 Package Sources (Linux)
if: runner.os == 'Linux' && runner.arch == 'ARM64'
shell: bash
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/_ci-build.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,16 @@ jobs:
echo "build_id=$(date +%s)-${{ github.run_id }}" >> $GITHUB_OUTPUT
echo "build_date=$(date -u +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_OUTPUT

# Build all packages using Turbo
# This creates the dist/ directories with compiled code
- name: Turbo Cache (GitHub Native)
uses: dtinth/setup-github-actions-caching-for-turbo@v1

- name: 🏗️ Build All Packages
run: pnpm run build
shell: bash

- name: Cache Report
run: echo "Check turbo summary above for HIT/MISS"

# Upload build artifacts, but only from Linux
# This is because Linux builds are most consistent and used by all other jobs
# The artifacts include all dist/ and dist-js/ directories from all packages
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/_ci-e2e.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,12 @@ jobs:
run: |
echo "::notice::Build artifact: ID=${{ inputs.build_id }}, Size=${{ inputs.artifact_size }} bytes"

- name: Turbo Cache (GitHub Native)
uses: rharkor/caching-for-turbo@v1
with:
turbo-cache-path: .turbo/cache

# Dynamically generate the Turbo filter for building test applications
# This converts the scenario input into Turbo filter syntax
- name: 🪄 Generate Build Filter for Test Apps
id: gen-build
uses: actions/github-script@v8
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/_ci-package.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,9 @@ jobs:
echo "::warning::No dist directories found, build extraction may have failed"
fi

- name: Turbo Cache (GitHub Native)
uses: rharkor/caching-for-turbo@v1

# Pack services from downloaded artifacts so --skip-build can use them
# This creates the .tgz files that the test script expects when --skip-build is used
- name: 📦 Pack Services from Artifacts
Expand Down Expand Up @@ -243,3 +246,6 @@ jobs:
if: failure()
with:
timeout: '180000'

- name: Cache Report
run: echo "Check turbo summary above for HIT/MISS"
6 changes: 6 additions & 0 deletions .github/workflows/_ci-unit.reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,14 @@ jobs:
echo "::warning::No dist directories found, build extraction may have failed"
fi

- name: Turbo Cache (GitHub Native)
uses: rharkor/caching-for-turbo@v1

# Run unit and integration tests using Turbo
# The --only flag ensures we only run tests for the packages that have changed
- name: 🧪 Execute Unit and Integration Tests
run: pnpm run test:unit test:integration --only
shell: bash

- name: Cache Report
run: echo "Check turbo summary above for HIT/MISS"
16 changes: 5 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,11 @@ jobs:
with:
os: 'ubuntu-latest'

# Run linting after build to use the build artifacts
# Run linting after change detection
lint:
name: Lint [Linux]
needs: [detect-changes, build]
needs: [detect-changes]
uses: ./.github/workflows/_ci-lint.reusable.yml
with:
cache_key: ${{ needs.build.outputs.cache_key }}

# Run unit tests in parallel with lint - both only need build artifacts
unit-matrix:
Expand Down Expand Up @@ -129,11 +127,7 @@ jobs:
artifact_size: ${{ needs.build.outputs.artifact_size }}
cache_key: ${{ needs.build.outputs.cache_key }}

# Run package tests after unit tests to ensure the package is built correctly
# Split Electron and Tauri tests across separate jobs for better parallelization and clarity
# Electron apps are built inline on the test runner (faster builds, Turbo caching handles it)
# Tauri apps are built separately due to longer build times and system dependencies
# Electron package tests are split by module type (CJS/ESM) for better error isolation
# Electron package tests run in parallel with linting
package-electron-matrix:
name: Package - Electron
needs: [detect-changes, build]
Expand Down Expand Up @@ -249,7 +243,7 @@ jobs:
with:
distro: ${{ matrix.distro }}

# Run build tests outside of the main Linux build job
# Run build tests in parallel with linting
build-matrix:
name: Build
needs: [detect-changes, build]
Expand Down Expand Up @@ -440,7 +434,7 @@ jobs:
cache_key: ${{ needs.build.outputs.cache_key }}
tauri_cache_key: ''

# Universal binary verification - Electron only
# Universal binary verification - Electron only (runs in parallel with linting)
package-electron-mac-universal:
name: Package - Electron [macOS-Universal-Verify]
needs: [detect-changes, build]
Expand Down
Loading