Skip to content

Privacy-first password manager with built-in email aliasing. Fully encrypted and self-hostable.

Update GH workflows to only trigger when associated code changes (#1465)

Leendert de Borst1b53515e639e
diff --git a/.github/workflows/browser-extension-build.yml b/.github/workflows/browser-extension-build.yml
index e4971e68c..14c5550ad 100644
--- a/.github/workflows/browser-extension-build.yml
+++ b/.github/workflows/browser-extension-build.yml
@@ -3,8 +3,20 @@ name: Browser Extension Build
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/browser-extension/**'
+ - 'core/**'
+ - '.github/workflows/browser-extension-build.yml'
+ - '.github/actions/build-browser-extension/**'
+ - '.github/actions/build-core-libraries/**'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/browser-extension/**'
+ - 'core/**'
+ - '.github/workflows/browser-extension-build.yml'
+ - '.github/actions/build-browser-extension/**'
+ - '.github/actions/build-core-libraries/**'
workflow_dispatch:
concurrency:
diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml
index 88660582f..8a0dee86f 100644
--- a/.github/workflows/docker-build.yml
+++ b/.github/workflows/docker-build.yml
@@ -3,8 +3,20 @@ name: Docker Build Tests
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'dockerfiles/**'
+ - 'docker-compose.yml'
+ - 'install.sh'
+ - '.github/workflows/docker-build.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'dockerfiles/**'
+ - 'docker-compose.yml'
+ - 'install.sh'
+ - '.github/workflows/docker-build.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
diff --git a/.github/workflows/dotnet-integration-tests.yml b/.github/workflows/dotnet-integration-tests.yml
index 9c89d9018..303d6571c 100644
--- a/.github/workflows/dotnet-integration-tests.yml
+++ b/.github/workflows/dotnet-integration-tests.yml
@@ -4,8 +4,18 @@ name: Integration Tests
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - 'install.sh'
+ - '.github/workflows/dotnet-integration-tests.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - 'install.sh'
+ - '.github/workflows/dotnet-integration-tests.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
diff --git a/.github/workflows/dotnet-unit-tests.yml b/.github/workflows/dotnet-unit-tests.yml
index 49f455cb5..cc7942cf7 100644
--- a/.github/workflows/dotnet-unit-tests.yml
+++ b/.github/workflows/dotnet-unit-tests.yml
@@ -4,8 +4,16 @@ name: Unit Tests
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - '.github/workflows/dotnet-unit-tests.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - '.github/workflows/dotnet-unit-tests.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
diff --git a/.github/workflows/android-ui-tests.yml b/.github/workflows/e2e-tests-android.yml
similarity index 94%
rename from .github/workflows/android-ui-tests.yml
rename to .github/workflows/e2e-tests-android.yml
index 2f6fcd939..e492d5a71 100644
--- a/.github/workflows/android-ui-tests.yml
+++ b/.github/workflows/e2e-tests-android.yml
@@ -1,10 +1,19 @@
-name: Android UI Tests
+# Android native E2E tests
+name: E2E Tests - Android
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-android.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-android.yml'
workflow_dispatch:
concurrency:
@@ -12,7 +21,7 @@ concurrency:
cancel-in-progress: true
jobs:
- android-ui-tests:
+ android-e2e-tests:
if: false # Temporarily disabled - will re-test in separate PR
timeout-minutes: 60
runs-on: ubuntu-latest
@@ -179,7 +188,7 @@ jobs:
sleep 2
done
- - name: Build and Run Android UI Tests
+ - name: Build and Run Android E2E Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 34
@@ -212,7 +221,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: android-ui-test-results
+ name: android-e2e-test-results
path: apps/mobile-app/android/app/build/reports/androidTests/
retention-days: 14
@@ -220,7 +229,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: android-ui-test-outputs
+ name: android-e2e-test-outputs
path: apps/mobile-app/android/app/build/outputs/androidTest-results/
retention-days: 14
@@ -228,7 +237,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
- name: android-ui-test-logs
+ name: android-e2e-test-logs
path: |
/tmp/api-server.log
/tmp/metro.log
diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests-browser-extension.yml
similarity index 64%
rename from .github/workflows/e2e-tests.yml
rename to .github/workflows/e2e-tests-browser-extension.yml
index 2a42661d6..cb0169c01 100644
--- a/.github/workflows/e2e-tests.yml
+++ b/.github/workflows/e2e-tests-browser-extension.yml
@@ -1,118 +1,25 @@
-# This workflow will test if running the e2e tests works.
-name: E2E Tests
+# Browser Extension E2E tests
+name: E2E Tests - Browser Extension
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/browser-extension/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-browser-extension.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/browser-extension/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-browser-extension.yml'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
- admin-tests:
- timeout-minutes: 60
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
-
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
-
- - name: Install dependencies
- working-directory: apps/server
- run: dotnet workload install wasm-tools
-
- - name: Build
- working-directory: apps/server
- run: dotnet build
-
- - name: Start dev database
- run: ./install.sh configure-dev-db start
-
- - name: Ensure browsers are installed
- working-directory: apps/server
- run: pwsh Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps
-
- - name: Run AdminTests with retry
- uses: nick-fields/retry@v3
- with:
- timeout_minutes: 60
- max_attempts: 3
- command: cd apps/server && dotnet test Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=AdminTests"
-
- - name: Upload Test Results
- if: always()
- uses: actions/upload-artifact@v4
- with:
- name: admin-test-results
- path: TestResults-Admin.xml
-
- client-tests:
- timeout-minutes: 60
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- shard: [1, 2, 3, 4, 5]
- steps:
- - uses: actions/checkout@v4
-
- - name: Setup .NET
- uses: actions/setup-dotnet@v4
- with:
- dotnet-version: 9.0.x
-
- - name: Setup Node.js
- uses: actions/setup-node@v4
- with:
- node-version: '20'
-
- - name: Setup Rust toolchain
- uses: dtolnay/rust-toolchain@stable
- with:
- targets: wasm32-unknown-unknown
-
- - name: Cache Rust dependencies
- uses: Swatinem/rust-cache@v2
- with:
- workspaces: core/rust
-
- - name: Install wasm-pack
- run: cargo install wasm-pack --locked
-
- - name: Build core libraries
- run: |
- cd ./core
- chmod +x build-and-distribute.sh
- ./build-and-distribute.sh --browser
-
- - name: Install dependencies
- working-directory: apps/server
- run: dotnet workload install wasm-tools
-
- - name: Build
- working-directory: apps/server
- run: dotnet build
-
- - name: Start dev database
- run: ./install.sh configure-dev-db start
-
- - name: Ensure browsers are installed
- working-directory: apps/server
- run: pwsh Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps
-
- - name: Run ClientTests with retry (Shard ${{ matrix.shard }})
- uses: nick-fields/retry@v3
- with:
- timeout_minutes: 60
- max_attempts: 3
- command: cd apps/server && dotnet test Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "FullyQualifiedName~.E2ETests.Tests.Client.Shard${{ matrix.shard }}."
-
browser-extension-dotnet-tests:
timeout-minutes: 60
runs-on: ubuntu-latest
diff --git a/.github/workflows/ios-ui-tests.yml b/.github/workflows/e2e-tests-ios.yml
similarity index 95%
rename from .github/workflows/ios-ui-tests.yml
rename to .github/workflows/e2e-tests-ios.yml
index e485f246d..35d179197 100644
--- a/.github/workflows/ios-ui-tests.yml
+++ b/.github/workflows/e2e-tests-ios.yml
@@ -1,10 +1,19 @@
-name: iOS UI Tests
+# iOS native E2E tests
+name: E2E Tests - iOS
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-ios.yml'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/e2e-tests-ios.yml'
workflow_dispatch:
concurrency:
@@ -12,7 +21,7 @@ concurrency:
cancel-in-progress: true
jobs:
- ios-ui-tests:
+ ios-e2e-tests:
if: false # Temporarily disabled - will re-test in separate PR
timeout-minutes: 60
runs-on: macos-15
@@ -216,7 +225,7 @@ jobs:
env:
IDEFileSystemSynchronizedGroupsAreEnabled: NO
- - name: Run iOS UI Tests
+ - name: Run iOS E2E Tests
run: |
cd ios
xcodebuild test-without-building \
@@ -255,7 +264,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: ios-ui-test-results
+ name: ios-e2e-test-results
path: apps/mobile-app/ios/TestResults.xcresult
retention-days: 14
@@ -263,7 +272,7 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
- name: ios-ui-test-attachments
+ name: ios-e2e-test-attachments
path: /tmp/test-attachments/
retention-days: 14
if-no-files-found: ignore
@@ -272,7 +281,7 @@ jobs:
if: failure()
uses: actions/upload-artifact@v4
with:
- name: ios-ui-test-logs
+ name: ios-e2e-test-logs
path: |
/tmp/api-server.log
/tmp/metro.log
diff --git a/.github/workflows/e2e-tests-server.yml b/.github/workflows/e2e-tests-server.yml
new file mode 100644
index 000000000..55cedffbc
--- /dev/null
+++ b/.github/workflows/e2e-tests-server.yml
@@ -0,0 +1,124 @@
+# Server E2E tests (Admin and Client/Blazor WASM)
+name: E2E Tests - Server
+
+on:
+ push:
+ branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - 'install.sh'
+ - '.github/workflows/e2e-tests-server.yml'
+ pull_request:
+ branches: [ "main" ]
+ paths:
+ - 'apps/server/**'
+ - 'core/**'
+ - 'install.sh'
+ - '.github/workflows/e2e-tests-server.yml'
+
+concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+ cancel-in-progress: true
+
+jobs:
+ admin-tests:
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.0.x
+
+ - name: Install dependencies
+ working-directory: apps/server
+ run: dotnet workload install wasm-tools
+
+ - name: Build
+ working-directory: apps/server
+ run: dotnet build
+
+ - name: Start dev database
+ run: ./install.sh configure-dev-db start
+
+ - name: Ensure browsers are installed
+ working-directory: apps/server
+ run: pwsh Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps
+
+ - name: Run AdminTests with retry
+ uses: nick-fields/retry@v3
+ with:
+ timeout_minutes: 60
+ max_attempts: 3
+ command: cd apps/server && dotnet test Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "Category=AdminTests"
+
+ - name: Upload Test Results
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: admin-test-results
+ path: TestResults-Admin.xml
+
+ client-tests:
+ timeout-minutes: 60
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ shard: [1, 2, 3, 4, 5]
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: 9.0.x
+
+ - name: Setup Node.js
+ uses: actions/setup-node@v4
+ with:
+ node-version: '20'
+
+ - name: Setup Rust toolchain
+ uses: dtolnay/rust-toolchain@stable
+ with:
+ targets: wasm32-unknown-unknown
+
+ - name: Cache Rust dependencies
+ uses: Swatinem/rust-cache@v2
+ with:
+ workspaces: core/rust
+
+ - name: Install wasm-pack
+ run: cargo install wasm-pack --locked
+
+ - name: Build core libraries
+ run: |
+ cd ./core
+ chmod +x build-and-distribute.sh
+ ./build-and-distribute.sh --browser
+
+ - name: Install dependencies
+ working-directory: apps/server
+ run: dotnet workload install wasm-tools
+
+ - name: Build
+ working-directory: apps/server
+ run: dotnet build
+
+ - name: Start dev database
+ run: ./install.sh configure-dev-db start
+
+ - name: Ensure browsers are installed
+ working-directory: apps/server
+ run: pwsh Tests/AliasVault.E2ETests/bin/Debug/net9.0/playwright.ps1 install --with-deps
+
+ - name: Run ClientTests with retry (Shard ${{ matrix.shard }})
+ uses: nick-fields/retry@v3
+ with:
+ timeout_minutes: 60
+ max_attempts: 3
+ command: cd apps/server && dotnet test Tests/AliasVault.E2ETests --no-build --verbosity normal --filter "FullyQualifiedName~.E2ETests.Tests.Client.Shard${{ matrix.shard }}."
diff --git a/.github/workflows/mobile-app-build.yml b/.github/workflows/mobile-app-build.yml
index fb4525f0c..a42ffc2d2 100644
--- a/.github/workflows/mobile-app-build.yml
+++ b/.github/workflows/mobile-app-build.yml
@@ -3,8 +3,20 @@ name: Mobile App Build
on:
push:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/mobile-app-build.yml'
+ - '.github/actions/build-android-app/**'
+ - '.github/actions/build-ios-app/**'
pull_request:
branches: [ "main" ]
+ paths:
+ - 'apps/mobile-app/**'
+ - 'core/**'
+ - '.github/workflows/mobile-app-build.yml'
+ - '.github/actions/build-android-app/**'
+ - '.github/actions/build-ios-app/**'
workflow_dispatch:
inputs:
build_android_signed: