Skip to content
Draft
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
28 changes: 13 additions & 15 deletions .github/workflows/cypress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
- reopened
- ready_for_review
- labeled
- unlabeled

concurrency:
group: cypress-${{ github.head_ref || github.run_id }}
Expand All @@ -38,6 +39,7 @@ permissions:
jobs:
gate:
runs-on: ubuntu-latest-low
name: Fail Crypress tests if labels are missing (force-e2e-tests, 3. to review, or 4. to release)
steps:
- name: Evaluate e2e tests execution conditions
id: gate-e2e
Expand All @@ -61,7 +63,7 @@ jobs:
if (hasForceLabel || hasToReviewLabel || hasToReleaseLabel || cypressTouched) {
return
} else {
core.setFailed('Skipping Cypress: draft state, missing labels or no cypress path changes.')
core.setFailed('Skipping Cypress: missing required labels (force-e2e-tests, 3. to review, or 4. to release), or no cypress path changes.')
}

init:
Expand All @@ -88,7 +90,7 @@ jobs:
id: check_composer
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
with:
files: 'composer.json'
files: "composer.json"

- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true'
Expand All @@ -98,8 +100,8 @@ jobs:
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
id: versions
with:
fallbackNode: '^24'
fallbackNpm: '^11.3'
fallbackNode: "^24"
fallbackNpm: "^11.3"

- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Expand Down Expand Up @@ -141,7 +143,7 @@ jobs:
matrix:
# Run multiple copies of the current job in parallel
# Please increase the number or runners as your tests suite grows (0 based index for e2e tests)
containers: ['setup', '0', '1', '2', '3', '4']
containers: ["setup", "0", "1", "2", "3", "4"]
# Hack as strategy.job-total includes the "setup" and GitHub does not allow math expressions
# Always align this number with the total of e2e runners (max. index + 1)
total-containers: [5]
Expand All @@ -151,7 +153,7 @@ jobs:
# Only start mysql if we are running the setup tests
image: ${{matrix.containers == 'setup' && 'ghcr.io/nextcloud/continuous-integration-mysql-8.4:latest' || ''}} # zizmor: ignore[unpinned-images]
ports:
- '3306/tcp'
- "3306/tcp"
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
Expand All @@ -163,7 +165,7 @@ jobs:
# Only start mariadb if we are running the setup tests
image: ${{matrix.containers == 'setup' && 'mariadb:11.4' || ''}} # zizmor: ignore[unpinned-images]
ports:
- '3306/tcp'
- "3306/tcp"
env:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_USER: oc_autotest
Expand All @@ -175,7 +177,7 @@ jobs:
# Only start postgres if we are running the setup tests
image: ${{matrix.containers == 'setup' && 'ghcr.io/nextcloud/continuous-integration-postgres-17:latest' || ''}} # zizmor: ignore[unpinned-images]
ports:
- '5432/tcp'
- "5432/tcp"
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: rootpassword
Expand All @@ -186,10 +188,10 @@ jobs:
# Only start oracle if we are running the setup tests
image: ${{matrix.containers == 'setup' && 'ghcr.io/gvenzl/oracle-free:23' || ''}} # zizmor: ignore[unpinned-images]
ports:
- '1521'
- "1521"
env:
ORACLE_PASSWORD: oracle
options: --health-cmd healthcheck.sh --health-interval 20s --health-timeout 10s --health-retries 10
options: --health-cmd healthcheck.sh --health-interval 20s --health-timeout 10s --health-retries 10

name: runner ${{ matrix.containers }}

Expand All @@ -214,7 +216,7 @@ jobs:
if: steps.cache.outputs.cache-hit != 'true'
uses: andstor/file-existence-action@558493d6c74bf472d87c84eab196434afc2fa029 # v3.1.0
with:
files: 'composer.json'
files: "composer.json"

- name: Install composer dependencies
if: steps.check_composer.outputs.files_exists == 'true' && steps.cache.outputs.cache-hit != 'true'
Expand Down Expand Up @@ -289,11 +291,7 @@ jobs:
summary:
runs-on: ubuntu-latest-low
needs: [init, cypress]

if: always()

name: cypress-summary

steps:
- name: Summary status
run: if ${{ needs.init.result != 'success' || ( needs.cypress.result != 'success' && needs.cypress.result != 'skipped' ) }}; then exit 1; fi
Expand Down
Loading
Loading