Skip to content

Commit

Permalink
ci: add UI tests with DB watchers disabled (#32397)
Browse files Browse the repository at this point in the history
  • Loading branch information
sampaiodiego authored May 10, 2024
1 parent a3ef33c commit 3433f48
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 2 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/ci-test-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ on:
type:
required: true
type: string
db-watcher-disabled:
default: 'false'
required: false
type: string
secrets:
CR_USER:
required: true
Expand Down Expand Up @@ -83,7 +87,7 @@ jobs:
mongodb-version: ${{ fromJSON(inputs.mongodb-version) }}
shard: ${{ fromJSON(inputs.shard) }}

name: MongoDB ${{ matrix.mongodb-version }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}
name: MongoDB ${{ matrix.mongodb-version }}${{ inputs.db-watcher-disabled == 'true' && ' [no watchers]' || '' }} (${{ matrix.shard }}/${{ inputs.total-shard }})${{ matrix.mongodb-version == '6.0' && ' - Alpine' || '' }}

steps:
- name: Login to GitHub Container Registry
Expand Down Expand Up @@ -161,6 +165,7 @@ jobs:
TRANSPORTER: ${{ inputs.transporter }}
COVERAGE_DIR: '/tmp/coverage'
COVERAGE_REPORTER: 'lcov'
DISABLE_DB_WATCHERS: ${{ inputs.db-watcher-disabled }}
run: |
docker compose -f docker-compose-ci.yml up -d
Expand Down
32 changes: 31 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -389,10 +389,40 @@ jobs:
REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

test-ui-ee-no-watcher:
name: 🔨 Test UI (EE)
needs: [checks, build-gh-docker-coverage, release-versions]

uses: ./.github/workflows/ci-test-e2e.yml
with:
type: ui
release: ee
transporter: 'nats://nats:4222'
enterprise-license: ${{ needs.release-versions.outputs.enterprise-license }}
shard: '[1, 2, 3, 4, 5]'
total-shard: 5
mongodb-version: "['6.0']"
node-version: ${{ needs.release-versions.outputs.node-version }}
lowercase-repo: ${{ needs.release-versions.outputs.lowercase-repo }}
rc-dockerfile: ${{ needs.release-versions.outputs.rc-dockerfile }}
rc-docker-tag: ${{ needs.release-versions.outputs.rc-docker-tag }}
rc-dockerfile-alpine: ${{ needs.release-versions.outputs.rc-dockerfile-alpine }}
rc-docker-tag-alpine: ${{ needs.release-versions.outputs.rc-docker-tag-alpine }}
gh-docker-tag: ${{ needs.release-versions.outputs.gh-docker-tag }}
retries: ${{ (github.event_name == 'release' || github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') && 2 || 0 }}
db-watcher-disabled: 'true'
secrets:
CR_USER: ${{ secrets.CR_USER }}
CR_PAT: ${{ secrets.CR_PAT }}
QASE_API_TOKEN: ${{ secrets.QASE_API_TOKEN }}
REPORTER_ROCKETCHAT_API_KEY: ${{ secrets.REPORTER_ROCKETCHAT_API_KEY }}
REPORTER_ROCKETCHAT_URL: ${{ secrets.REPORTER_ROCKETCHAT_URL }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

tests-done:
name: ✅ Tests Done
runs-on: ubuntu-20.04
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee]
needs: [checks, test-unit, test-api, test-ui, test-api-ee, test-ui-ee, test-ui-ee-no-watcher]

steps:
- name: Test finish aggregation
Expand Down
2 changes: 2 additions & 0 deletions docker-compose-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ services:
- 'ROCKETCHAT_LICENSE=${ENTERPRISE_LICENSE}'
- 'COVERAGE_DIR=${COVERAGE_DIR}'
- 'COVERAGE_REPORTER=${COVERAGE_REPORTER}'
- DISABLE_DB_WATCHERS=${DISABLE_DB_WATCHERS}
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
Expand Down Expand Up @@ -115,6 +116,7 @@ services:
- MONGO_URL=${MONGO_URL}
- 'TRANSPORTER=${TRANSPORTER}'
- MOLECULER_LOG_LEVEL=info
- DISABLE_DB_WATCHERS=${DISABLE_DB_WATCHERS}
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
Expand Down

0 comments on commit 3433f48

Please sign in to comment.