Skip to content

Commit

Permalink
Merge pull request #5417 from novuhq/next
Browse files Browse the repository at this point in the history
next > 0.25.x
  • Loading branch information
LetItRock authored Apr 19, 2024
2 parents 5b0da56 + 54617f5 commit 08a6518
Show file tree
Hide file tree
Showing 311 changed files with 11,462 additions and 1,831 deletions.
17 changes: 15 additions & 2 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
{
"extends": ["@commitlint/config-conventional"],
"extends": [
"@commitlint/config-conventional"
],
"rules": {
"body-max-line-length": [
0,
"always"
],
"subject-case": [
2,
"always",
["sentence-case", "start-case", "pascal-case", "upper-case", "lower-case", "camel-case"]
[
"sentence-case",
"start-case",
"pascal-case",
"upper-case",
"lower-case",
"camel-case"
]
],
"type-enum": [
2,
Expand Down
17 changes: 14 additions & 3 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,9 @@
"upserted",
"upstash",
"Upstash",
"usecase",
"USECASE",
"Vonage",
"Krakend",
"ratelimit",
"Ratelimit",
Expand Down Expand Up @@ -600,19 +603,26 @@
"cpack",
"pulumi",
"hostedtoolcache",
"OTLP",
"otlp",
"hostedtoolcache",
"pyroscope",
"HEAY",
"Pyroscope",
"PYROSCOPE",
"usecases",
"hbspt",
"hbspt",
"prepopulating",
"Vonage",
"fieldtype",
"usecase",
"zulip",
"uuidv",
"Vonage"
"Vonage",
"runtimes",
"cafebabe",
"Icann",
"limitbar",
],
"flagWords": [],
"patterns": [
Expand Down Expand Up @@ -675,6 +685,7 @@
"apps/api/src/.env.test",
"apps/ws/src/.env.test",
"apps/ws/src/.example.env",
"apps/web/playwright.config.ts",
".cspell.json",
"package.json",
"package-lock.json",
Expand All @@ -696,6 +707,6 @@
"angular.json",
"ng-package.json",
"libs/shared/src/types/timezones/timezones.types.ts",
"*.riv"
"*.riv",
]
}
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ module.exports = {
{
patterns: [
'@novu/shared/*',
'!@novu/shared/utils',
'@novu/dal/*',
'!import2/good',
'*../libs/dal/*',
Expand Down
18 changes: 11 additions & 7 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
### What change does this PR introduce?
### What changed? Why was the change needed?
<!-- Also include any relevant links, such as Linear tickets, Slack discussions, or design documents. -->

<!-- Explain here the changes your PR introduces and text to help us understand the context of this change. -->
### Screenshots
<!-- If the changes are visual, include screenshots or screencasts. -->

### Why was this change needed?
<details>
<summary><strong>Expand for optional sections</strong></summary>

<!-- If your PR fixes an open issue, use `Closes #999` to link your PR with the issue. #999 stands for the issue number you are fixing, Example: Closes #31 -->
### Related enterprise PR
<!-- A link to a dependent pull request -->

### Other information (Screenshots)
### Special notes for your reviewer
<!-- Specific instructions or considerations you want to highlight for the reviewer. -->

<!-- Add notes or any other information here -->
<!-- Also add all the screenshots which support your changes -->
</details>
8 changes: 6 additions & 2 deletions .github/actions/run-backend/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ inputs:
cypress_github_oauth_client_secret:
description: 'Cypress GitHub client secret'
required: true
ci_ee_test:
description: 'Whether the app should import ee packages for testing'
required: false
default: 'false'

runs:
using: composite
Expand All @@ -28,7 +32,7 @@ runs:
TZ: "UTC"
GITHUB_OAUTH_REDIRECT: "http://127.0.0.1:1336/v1/auth/github/callback"
LAUNCH_DARKLY_SDK_KEY: ${{ inputs.launch_darkly_sdk_key }}
CI_EE_TEST: "true"
CI_EE_TEST: ${{ inputs.ci_ee_test }}
run: cd apps/api && pnpm start:build &

- name: Start Worker
Expand All @@ -38,7 +42,7 @@ runs:
PORT: "1342"
TZ: "UTC"
LAUNCH_DARKLY_SDK_KEY: ${{ inputs.launch_darkly_sdk_key }}
CI_EE_TEST: "true"
CI_EE_TEST: ${{ inputs.ci_ee_test }}
run: cd apps/worker && pnpm start:prod &

- name: Wait on API and Worker
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/pr-manager.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,20 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Process stale PRs
uses: Sonia-corporation/stale@2.5.0
uses: actions/stale@v9
with:
issue-processing: false
pull-request-days-before-stale: 14
pull-request-days-before-close: 180
pull-request-ignore-draft: true
pull-request-ignore-all-milestones: true
pull-request-stale-label: 'stale'
# Get issues in descending (newest first) order.
ascending: false
# After 6 months, mark issue as stale.
days-before-issue-stale: 180
# Do not auto-close issues marked as stale.
days-before-issue-close: -1
# After 3 months, mark PR as stale.
days-before-pr-stale: 90
# Auto-close PRs marked as stale a month later.
days-before-pr-close: 31
# Delete the branch when closing PRs. GitHub's "restore branch" function works indefinitely, so no reason not to.
delete-branch: true
stale-pr-message: "This PR is being marked as stale due to inactivity."
close-pr-message: "This PR is being closed due to inactivity. Please reopen if work is intended to be continued."
operations-per-run: 100
81 changes: 57 additions & 24 deletions .github/workflows/reusable-web-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ jobs:
# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
# run 5 copies of the current job in parallel
containers: [1, 2, 3, 4, 5]
total: [5]

# The type of runner that the job will run on
runs-on: ubuntu-latest
Expand Down Expand Up @@ -74,6 +78,7 @@ jobs:
cypress_github_oauth_client_id: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
cypress_github_oauth_client_secret: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
ci_ee_test: ${{ steps.setup.outputs.has_token }}

- name: Start Client
working-directory: apps/web
Expand Down Expand Up @@ -103,8 +108,7 @@ jobs:
- run: |
echo "BROWSER_PATH=$(which chrome)" >> $GITHUB_ENV
- name: Cypress run EE e2e
if: ${{ inputs.ee }}
- name: Cypress run e2e
uses: cypress-io/github-action@v6
env:
NODE_ENV: test
Expand All @@ -116,35 +120,64 @@ jobs:
with:
working-directory: apps/web
browser: "${{ env.BROWSER_PATH }}"
record: false
record: true
parallel: true
install: false
parallel: false
config-file: cypress.config.ts
spec: "cypress/tests/**/*.spec-ee.{js,jsx,ts,tsx}"
spec: |
cypress/tests/**/*.spec.ts
${{ steps.setup.outputs.has_token == 'true' && inputs.ee && 'cypress/tests/**/*.spec-ee.ts' }}
- name: Cypress run e2e
uses: cypress-io/github-action@v6
env:
NODE_ENV: test
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_WEB_KEY }}
CYPRESS_GITHUB_USER_EMAIL: ${{ secrets.CYPRESS_GITHUB_USER_EMAIL }}
CYPRESS_GITHUB_USER_PASSWORD: ${{ secrets.CYPRESS_GITHUB_USER_PASSWORD }}
CYPRESS_IS_CI: true
- name: Playwright Install
working-directory: apps/web
run: pnpm playwright:install

- name: Run Playwright tests
working-directory: apps/web
run: pnpm playwright:test --shard=${{ matrix.containers }}/${{ matrix.total }}

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
working-directory: apps/web
browser: "${{ env.BROWSER_PATH }}"
record: false
parallel: false
install: false
config-file: cypress.config.ts
spec: "cypress/tests/**/*.spec.{js,jsx,ts,tsx}"
name: blob-report-${{ matrix.containers }}
path: apps/web/blob-report
retention-days: 1

- uses: actions/upload-artifact@v3
if: failure()
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: cypress-screenshots
name: cypress-screenshots-${{ matrix.containers }}
path: apps/web/cypress/screenshots
retention-days: 30

merge-reports:
# Merge reports after playwright-tests, even if some shards have failed
if: ${{ !cancelled() }}
needs: [e2e_web]

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20.8.1

- name: Download blob reports from GitHub Actions Artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true

- name: Merge into HTML Report
run: npx playwright merge-reports --reporter html ./all-blob-reports

- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 14

component_web:
if: "!contains(github.event.head_commit.message, 'ci skip')"
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/reusable-widget-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
cypress_github_oauth_client_id: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_ID }}
cypress_github_oauth_client_secret: ${{ secrets.CYPRESS_GITHUB_OAUTH_CLIENT_SECRET }}
launch_darkly_sdk_key: ${{ secrets.LAUNCH_DARKLY_SDK_KEY }}
ci_ee_test: ${{ steps.setup.outputs.has_token }}

# Runs a single command using the runners shell
- name: Start Client
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,30 +108,6 @@ jobs:
if: ${{ contains(fromJson(needs.get-affected.outputs.test-cypress), '@novu/widget') || contains(fromJson(needs.get-affected.outputs.test-unit), '@novu/notification-center') || contains(fromJson(needs.get-affected.outputs.test-unit), '@novu/ws') }}
secrets: inherit

build_docker_api:
name: Build Docker API
runs-on: ubuntu-latest
timeout-minutes: 80
needs: [get-affected]
if: ${{ contains(fromJson(needs.get-affected.outputs.test-e2e), '@novu/api') }}
permissions:
contents: read
packages: write
deployments: write
id-token: write
strategy:
matrix:
name: ['novu/api', 'novu/api-ee']
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-project
- uses: ./.github/actions/setup-redis-cluster
- uses: ./.github/actions/docker/build-api
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
fork: ${{ github.event.pull_request.head.repo.fork }}
docker_name: ${{ matrix.name }}

test_providers:
name: Unit Test Providers
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .source
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ You can open a new issue with this [issue form](https://github.com/novuhq/novu/i

The project is a monorepo, meaning that it is a collection of multiple packages managed in the same repository.

To learn more about the project structure and running the project locally, please have a look [here](https://docs.novu.co/community-support/introduction#run-novu-locally).
To learn more about the project structure and running the project locally, please have a look [here](https://docs.novu.co/community-support/introduction#run-novu-locally?utm_campaign=github-contrib).
After cloning your fork, you will need to run the `npm run setup:project` command to install and build all dependencies.

To learn a detailed guide on running the project locally, checkout our guide on [how to run novu in local machine](https://docs.novu.co/community/run-in-local-machine).
To learn a detailed guide on running the project locally, checkout our guide on [how to run novu in local machine](https://docs.novu.co/community/run-in-local-machine?utm_campaign=github-contrib).

## Missing a Feature?

Expand All @@ -86,8 +86,8 @@ Questions, suggestions, and thoughts are most welcome. Feel free to open a [GitH
- Help create tutorials and blog posts
- Request a feature by submitting a proposal
- Report a bug
- **Improve documentation** - fix incomplete or missing [docs](https://docs.novu.co/), bad wording, examples or explanations.
- **Improve documentation** - fix incomplete or missing [docs](https://docs.novu.co/?utm_campaign=github-contrib), bad wording, examples or explanations.

## Missing a provider?

If you are in need of a provider we do not yet have, you can request a new one by [submitting an issue](#submitting-an-issue). Or you can build a new one by following our [create a provider guide](https://docs.novu.co/community/add-a-new-provider).
If you are in need of a provider we do not yet have, you can request a new one by [submitting an issue](#submitting-an-issue). Or you can build a new one by following our [create a provider guide](https://docs.novu.co/community/add-a-new-provider?utm_campaign=github-contrib).
Loading

1 comment on commit 08a6518

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.