Skip to content

Commit

Permalink
Add ci-tests for 8.6 directory (#688)
Browse files Browse the repository at this point in the history
* feat(ci): add web-modeler ci-test for new 8.6 folder

* chore(operate|tasklist): adjust healthcheck

* chore(ci): adjust other tests for 8.6 directory

* feat(ci): just run modeler playwright test in 8.6 modeler test

* Revert "chore(operate|tasklist): adjust healthcheck"

This reverts commit 1d13448.

* disable csrf for 8.6 (forwardport from 8.5)

* Reapply "chore(operate|tasklist): adjust healthcheck"

This reverts commit 391a653.

* fix: changed port for compose-core as well

* fix: add environment-config to reduce shards

---------

Co-authored-by: Jesse Simpson <jesse.simpson@camunda.com>
  • Loading branch information
JacobiCamunda and jessesimpson36 authored Sep 5, 2024
1 parent 52645e9 commit b406bf0
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 18 deletions.
27 changes: 21 additions & 6 deletions .github/workflows/template-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ on:
description: runs playwright tests
required: true
type: boolean
directory:
description: directory to run the tests
required: false
type: string
run_single_test:
description: runs a single test
required: false
type: string

jobs:
test_compose_deploy:
Expand All @@ -28,10 +36,12 @@ jobs:
- uses: actions/checkout@v4

- name: Login to private registry
if: ${{ inputs.directory != 'docker-compose/camunda-8.6' }}
run: >-
echo '${{ secrets.CI_DISTRIBUTION_REGISTRY_PASSWORD }}' | docker login -u ci-distribution --password-stdin registry.camunda.cloud
- name: Bring up containers
working-directory: ${{ inputs.directory || '.' }}
run: >-
docker compose ${{ inputs.compose_args }}
up
Expand Down Expand Up @@ -61,28 +71,33 @@ jobs:
""
- uses: actions/setup-node@v4
if: ${{ inputs.run_e2e_tests }}
if: ${{ inputs.run_e2e_tests || inputs.run_single_test }}
with:
node-version: 18

- name: Install dependencies
if: ${{ inputs.run_e2e_tests }}
if: ${{ inputs.run_e2e_tests || inputs.run_single_test }}
run: npm ci
working-directory: ./e2e_tests

- name: Install Playwright Browsers
if: ${{ inputs.run_e2e_tests }}
if: ${{ inputs.run_e2e_tests || inputs.run_single_test }}
run: npx playwright install --with-deps
working-directory: ./e2e_tests

- name: Run Playwright tests
if: ${{ inputs.run_e2e_tests }}
if: ${{ inputs.run_e2e_tests && inputs.run_single_test == '' }}
run: npx playwright test
working-directory: ./e2e_tests

- name: Run single Playwright test '${{ inputs.run_single_test }}'
if: ${{ inputs.run_e2e_tests && inputs.run_single_test }}
run: npx playwright test ${{ inputs.run_single_test }}
working-directory: ./e2e_tests

- uses: actions/upload-artifact@v4
if: ${{ inputs.run_e2e_tests }}
if: ${{ inputs.run_e2e_tests || inputs.run_single_test }}
with:
name: playwright-report
name: playwright-report${{ inputs.run_single_test && '-single-test' || '' }}
path: e2e_tests/playwright-report/
retention-days: 30
15 changes: 13 additions & 2 deletions .github/workflows/test-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,20 @@ on:
- "**"
jobs:
test_core:
strategy:
matrix:
include:
- compose_args: "-f docker-compose-core.yaml"
run_e2e_tests: false
directory: ""
- compose_args: "-f docker-compose-core.yaml"
run_e2e_tests: false
directory: "docker-compose/camunda-8.6"
uses: ./.github/workflows/template-deploy.yaml
name: Test deploying from directory "${{ matrix.directory || 'root' }}"
secrets: inherit
with:
compose_args: "-f docker-compose-core.yaml"
run_e2e_tests: false
compose_args: ${{ matrix.compose_args }}
run_e2e_tests: ${{ matrix.run_e2e_tests }}
directory: ${{ matrix.directory }}

16 changes: 13 additions & 3 deletions .github/workflows/test-default.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,19 @@ on:
- "**"
jobs:
test_docker_compose_yaml:
strategy:
matrix:
include:
- compose_args: "-f docker-compose.yaml"
run_e2e_tests: false
directory: ""
- compose_args: "--profile full"
run_e2e_tests: false
directory: "docker-compose/camunda-8.6"
uses: ./.github/workflows/template-deploy.yaml
name: Test deploying from directory "${{ matrix.directory || 'root' }}"
secrets: inherit
with:
compose_args: "-f docker-compose.yaml"
run_e2e_tests: false

compose_args: ${{ matrix.compose_args }}
run_e2e_tests: ${{ matrix.run_e2e_tests }}
directory: ${{ matrix.directory }}
18 changes: 16 additions & 2 deletions .github/workflows/test-modeler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@ on:
push:
branches:
- "**"

jobs:
test_modeler_yaml:
strategy:
matrix:
include:
- compose_args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
run_e2e_tests: true
directory: ""
- compose_args: "--profile modeling"
run_e2e_tests: true
run_single_test: "web_modeler_login.spec.ts"
directory: "docker-compose/camunda-8.6"
uses: ./.github/workflows/template-deploy.yaml
name: Test deploying from directory "${{ matrix.directory || 'root' }}"
secrets: inherit
with:
compose_args: "-f docker-compose.yaml -f docker-compose-web-modeler.yaml"
run_e2e_tests: true
compose_args: ${{ matrix.compose_args }}
run_e2e_tests: ${{ matrix.run_e2e_tests }}
directory: ${{ matrix.directory }}
run_single_test: ${{ matrix.run_single_test }}
5 changes: 5 additions & 0 deletions docker-compose/camunda-8.6/.optimize/environment-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
es:
settings:
index:
number_of_replicas: 0

6 changes: 4 additions & 2 deletions docker-compose/camunda-8.6/docker-compose-core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@ services:
- CAMUNDA_OPERATE_ZEEBE_GATEWAYADDRESS=zeebe:26500
- CAMUNDA_OPERATE_ELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_OPERATE_ZEEBEELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_OPERATE_CSRFPREVENTIONENABLED=false
- management.endpoints.web.exposure.include=health
- management.endpoint.health.probes.enabled=true
healthcheck:
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:8080/actuator/health/readiness'" ]
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:9600/actuator/health/readiness'" ]
interval: 30s
timeout: 1s
retries: 5
Expand All @@ -74,10 +75,11 @@ services:
- CAMUNDA_TASKLIST_ZEEBE_RESTADDRESS=http://zeebe:8080
- CAMUNDA_TASKLIST_ELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_TASKLIST_ZEEBEELASTICSEARCH_URL=http://elasticsearch:9200
- CAMUNDA_TASKLIST_CSRFPREVENTIONENABLED=false
- management.endpoints.web.exposure.include=health
- management.endpoint.health.probes.enabled=true
healthcheck:
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:8080/actuator/health/readiness'" ]
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:9600/actuator/health/readiness'" ]
interval: 30s
timeout: 1s
retries: 5
Expand Down
4 changes: 2 additions & 2 deletions docker-compose/camunda-8.6/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:
- management.endpoint.health.probes.enabled=true
- ZEEBE_CLIENT_CONFIG_PATH=/tmp/zeebe_auth_cache
healthcheck:
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:8080/actuator/health/readiness'" ]
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:9600/actuator/health/readiness'" ]
interval: 30s
timeout: 1s
retries: 5
Expand Down Expand Up @@ -128,7 +128,7 @@ services:
- management.endpoints.web.exposure.include=health
- management.endpoint.health.probes.enabled=true
healthcheck:
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:8080/actuator/health/readiness'" ]
test: [ "CMD-SHELL", "wget -O - -q 'http://localhost:9600/actuator/health/readiness'" ]
interval: 30s
timeout: 1s
retries: 5
Expand Down
2 changes: 1 addition & 1 deletion e2e_tests/tests/web_modeler_login.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ test('test', async ({ page }) => {
await page.getByLabel('Password').click();
await page.getByLabel('Password').fill('demo');
await page.getByRole('button', { name: 'Log in' }).click();
await page.getByText('Welcome, demo').waitFor();
await page.getByText('Projects').waitFor();
await page.locator('[data-test="create-project"]').click();
});

0 comments on commit b406bf0

Please sign in to comment.