Skip to content

High performance self-hosted photo and video management solution.

ci: split e2e into web / server & cli / linting & run on mich (#12267)

Zack Pollard668632c398c6
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 7b1d44b354..ac6236d2eb 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -19,6 +19,8 @@ jobs:
should_run_e2e: ${{ steps.found_paths.outputs.e2e == 'true' || steps.should_force.outputs.should_force == 'true' }}
should_run_mobile: ${{ steps.found_paths.outputs.mobile == 'true' || steps.should_force.outputs.should_force == 'true' }}
should_run_ml: ${{ steps.found_paths.outputs.machine-learning == 'true' || steps.should_force.outputs.should_force == 'true' }}
+ should_run_e2e_web: ${{ steps.found_paths.outputs.e2e == 'true' || steps.found_paths.outputs.web == 'true' || steps.should_force.outputs.should_force == 'true' }}
+ should_run_e2e_server_cli: ${{ steps.found_paths.outputs.e2e == 'true' || steps.found_paths.outputs.server == 'true' || steps.found_paths.outputs.cli == 'true' || steps.should_force.outputs.should_force == 'true' }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -36,9 +38,6 @@ jobs:
- 'open-api/typescript-sdk/**'
e2e:
- 'e2e/**'
- - 'cli/**'
- - 'server/**'
- - 'open-api/typescript-sdk/**'
mobile:
- 'mobile/**'
machine-learning:
@@ -205,8 +204,8 @@ jobs:
run: npm run test:cov
if: ${{ !cancelled() }}
- e2e-tests:
- name: End-to-End Tests
+ e2e-tests-lint:
+ name: End-to-End Lint
needs: pre-job
if: ${{ needs.pre-job.outputs.should_run_e2e == 'true' }}
runs-on: ubuntu-latest
@@ -217,8 +216,6 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- with:
- submodules: 'recursive'
- name: Setup Node
uses: actions/setup-node@v4
@@ -230,11 +227,6 @@ jobs:
working-directory: ./open-api/typescript-sdk
if: ${{ !cancelled() }}
- - name: Run setup cli
- run: npm ci && npm run build
- working-directory: ./cli
- if: ${{ !cancelled() }}
-
- name: Install dependencies
run: npm ci
if: ${{ !cancelled() }}
@@ -251,8 +243,38 @@ jobs:
run: npm run check
if: ${{ !cancelled() }}
- - name: Install Playwright Browsers
- run: npx playwright install --with-deps chromium
+ e2e-tests-server-cli:
+ name: End-to-End Tests (Server & CLI)
+ needs: pre-job
+ if: ${{ needs.pre-job.outputs.should_run_e2e_server_cli == 'true' }}
+ runs-on: mich
+ defaults:
+ run:
+ working-directory: ./e2e
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: './e2e/.nvmrc'
+
+ - name: Run setup typescript-sdk
+ run: npm ci && npm run build
+ working-directory: ./open-api/typescript-sdk
+ if: ${{ !cancelled() }}
+
+ - name: Run setup cli
+ run: npm ci && npm run build
+ working-directory: ./cli
+ if: ${{ !cancelled() }}
+
+ - name: Install dependencies
+ run: npm ci
if: ${{ !cancelled() }}
- name: Docker build
@@ -263,6 +285,43 @@ jobs:
run: npm run test
if: ${{ !cancelled() }}
+ e2e-tests-web:
+ name: End-to-End Tests (Web)
+ needs: pre-job
+ if: ${{ needs.pre-job.outputs.should_run_e2e_web == 'true' }}
+ runs-on: mich
+ defaults:
+ run:
+ working-directory: ./e2e
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ with:
+ submodules: 'recursive'
+
+ - name: Setup Node
+ uses: actions/setup-node@v4
+ with:
+ node-version-file: './e2e/.nvmrc'
+
+ - name: Run setup typescript-sdk
+ run: npm ci && npm run build
+ working-directory: ./open-api/typescript-sdk
+ if: ${{ !cancelled() }}
+
+ - name: Install dependencies
+ run: npm ci
+ if: ${{ !cancelled() }}
+
+ - name: Install Playwright Browsers
+ run: npx playwright install --with-deps chromium
+ if: ${{ !cancelled() }}
+
+ - name: Docker build
+ run: docker compose build
+ if: ${{ !cancelled() }}
+
- name: Run e2e tests (web)
run: npx playwright test
if: ${{ !cancelled() }}