/
githubmirror
/
novu
Обзор
Документация
Войти
/
githubmirror
/
novu
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
next
.github/workflows/reusable-api-e2e.yml
88 строк
3 KB
Dima Grossman
ci(api): run novu-v2-ce e2e suite on fork PRs fixes NV-8154 (#11749)
01 июл 2026, 10:41
Не верифицирован
01 июл 2026, 10:41
f3a9632
Код
Авторство
О чём код?
name: E2E API Tests env: NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }} # Controls when the action will run. Triggers the workflow on push or pull request on: workflow_call: inputs: ee: description: "use the ee version of api" required: false default: false type: boolean jobs: e2e_api: name: Test E2E (Shard ${{ matrix.shard }}/${{ matrix.total }}) strategy: fail-fast: false matrix: include: ${{ fromJson('[{"shard":1,"total":4},{"shard":2,"total":4},{"shard":3,"total":4},{"shard":4,"total":4}]') }} runs-on: blacksmith-8vcpu-ubuntu-2404 timeout-minutes: 15 permissions: contents: read deployments: write id-token: write packages: write steps: - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 name: Checkout with submodules if: ${{ inputs.ee }} with: submodules: true token: ${{ secrets.SUBMODULES_TOKEN }} # Else checkout without submodules if the token is not provided - uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5 name: Checkout if: ${{ !inputs.ee }} - uses: ./.github/actions/setup-project name: Setup project with: submodules: ${{ inputs.ee }} - uses: ./.github/actions/start-localstack name: Start localstack - name: Build API & Worker env: NX_NO_CLOUD: ${{ secrets.NX_CLOUD_ACCESS_TOKEN == '' && 'true' || 'false' }} run: CI='' pnpm nx run-many --target=build --all --projects=@novu/api-service,@novu/worker - name: Start Worker shell: bash env: NOVU_ENTERPRISE: ${{ inputs.ee }} NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }} NEW_RELIC_ENABLED: true run: | # Start the worker service using pre-built code for deterministic startup cd apps/worker && NODE_ENV=test LOG_LEVEL=warn node dist/main.js & - name: Wait on worker shell: bash run: wait-on --timeout=180000 http://127.0.0.1:1342/v1/health-check - name: Run Novu V2 CE E2E tests if: ${{ !inputs.ee }} env: NOVU_V2_SHARD_INDEX: ${{ matrix.shard }} NOVU_V2_TOTAL_SHARDS: ${{ matrix.total }} NOVU_V2_MOCHA_REPORTER: dot run: | set -e pnpm --filter @novu/api-service test:e2e:novu-v2-ce - name: Run Novu V2 E2E tests if: ${{ inputs.ee }} env: NOVU_V2_SHARD_INDEX: ${{ matrix.shard }} NOVU_V2_TOTAL_SHARDS: ${{ matrix.total }} NOVU_V2_MOCHA_REPORTER: dot run: | set -e pnpm --filter @novu/api-service test:e2e:novu-v2