Skip to content

Commit

Permalink
Merge branch 'next' into dependabot/npm_and_yarn/word-wrap-1.2.5
Browse files Browse the repository at this point in the history
  • Loading branch information
scopsy committed Sep 18, 2023
2 parents 045fcb9 + da4d70d commit 04d421a
Show file tree
Hide file tree
Showing 190 changed files with 3,975 additions and 1,453 deletions.
3 changes: 2 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@
"errmsg",
"springboot",
"errmsg",
"shelljs"
"shelljs",
"prefiltering"
],
"flagWords": [],
"patterns": [
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/dev-deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,48 @@ jobs:
submodule_branch: "next"
secrets: inherit

test_e2e_ee:
name: Test E2E EE
runs-on: ubuntu-latest
timeout-minutes: 80
permissions:
contents: read
packages: write
deployments: write
id-token: write
steps:
- run: echo ${{ matrix.projectName }}
- uses: actions/checkout@v3
- uses: ./.github/actions/checkout-submodules
with:
submodule_token: ${{ secrets.SUBMODULES_TOKEN }}
submodule_branch: "next"
- uses: ./.github/actions/setup-project
- uses: ./.github/actions/setup-redis-cluster
- uses: mansagroup/nrwl-nx-action@v3
name: Lint and build
with:
targets: lint,build
projects: ${{matrix.projectName}}

- uses: ./.github/actions/start-localstack

- uses: ./.github/actions/run-worker
if: ${{matrix.projectName == '@novu/api' }}
with:
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}

- uses: mansagroup/nrwl-nx-action@v3
name: Running the E2E tests
env:
LAUNCH_DARKLY_SDK_KEY: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
CI_EE_TEST: true
with:
targets: test:e2e:ee
projects: ${{matrix.projectName}}

deploy_dev_api:
if: "!contains(github.event.head_commit.message, 'ci skip')"
# The type of runner that the job will run on
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/dev-deploy-inbound-mail.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ jobs:
needs: test_inbound_mail
timeout-minutes: 80
environment: Development
permissions:
contents: read
packages: write
deployments: write
id-token: write
if: "!contains(github.event.head_commit.message, 'ci skip')"
strategy:
matrix:
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/prod-deploy-api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,48 @@ jobs:
submodule_branch: "main"
secrets: inherit

test_e2e_ee:
name: Test E2E EE
runs-on: ubuntu-latest
timeout-minutes: 80
permissions:
contents: read
packages: write
deployments: write
id-token: write
steps:
- run: echo ${{ matrix.projectName }}
- uses: actions/checkout@v3
- uses: ./.github/actions/checkout-submodules
with:
submodule_token: ${{ secrets.SUBMODULES_TOKEN }}
submodule_branch: "next"
- uses: ./.github/actions/setup-project
- uses: ./.github/actions/setup-redis-cluster
- uses: mansagroup/nrwl-nx-action@v3
name: Lint and build
with:
targets: lint,build
projects: ${{matrix.projectName}}

- uses: ./.github/actions/start-localstack

- uses: ./.github/actions/run-worker
if: ${{matrix.projectName == '@novu/api' }}
with:
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}

- uses: mansagroup/nrwl-nx-action@v3
name: Running the E2E tests
env:
LAUNCH_DARKLY_SDK_KEY: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
GOOGLE_OAUTH_CLIENT_ID: ${{ secrets.GOOGLE_OAUTH_CLIENT_ID }}
GOOGLE_OAUTH_CLIENT_SECRET: ${{ secrets.GOOGLE_OAUTH_CLIENT_SECRET }}
CI_EE_TEST: true
with:
targets: test:e2e:ee
projects: ${{matrix.projectName}}

build_prod_image:
if: "!contains(github.event.head_commit.message, 'ci skip')"
# The type of runner that the job will run on
Expand Down
19 changes: 17 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,11 +227,26 @@ jobs:
targets: test:e2e
projects: ${{matrix.projectName}}

check_submodule_token:
name: Check if the secret exists or not.
runs-on: ubuntu-latest
outputs:
has_token: ${{ steps.secret-check.outputs.has_token }}
steps:
- name: Check if secret exists
id: secret-check
run: |
if [[ -n "${{ secrets.SUBMODULES_TOKEN }}" ]]; then
echo "::set-output name=has_token::true"
else
echo "::set-output name=has_token::false"
fi
test_e2e_ee:
name: Test E2E EE
runs-on: ubuntu-latest
needs: [get-affected]
if: ${{ fromJson(needs.get-affected.outputs.test-e2e-ee)[0] }}
needs: [get-affected, check_submodule_token]
if: ${{ fromJson(needs.get-affected.outputs.test-e2e-ee)[0] && needs.check_submodule_token.outputs.has_token == 'true' }}
timeout-minutes: 80
strategy:
# One job for each different project and node version
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/app/events/e2e/delay-events.e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ describe('Trigger event - Delay triggered events - /v1/events/trigger (POST)', f
eventNumber: '2',
sendAt: dateValue,
});
await session.awaitRunningJobs(template?._id, true, 1);
await session.awaitRunningJobs(template?._id, true, 0);

const messages = await messageRepository.find({
_environmentId: session.environment._id,
Expand Down
Loading

0 comments on commit 04d421a

Please sign in to comment.