emailengine-app 2.81.2 → 2.82.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.ncurc.js +12 -11
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +27 -0
- package/Dockerfile +2 -0
- package/bin/emailengine.js +28 -18
- package/config/default.toml +0 -5
- package/config/test.toml +0 -5
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +70 -42
- package/getswagger.sh +0 -4
- package/lib/account/account-state.js +2 -110
- package/lib/account/expected-identity.js +1 -1
- package/lib/account-assignment.js +138 -1
- package/lib/account.js +254 -859
- package/lib/api-reference/index.js +2 -3
- package/lib/api-reference/schema-tree.js +53 -3
- package/lib/api-routes/account-routes.js +18 -29
- package/lib/api-routes/blocklist-routes.js +2 -2
- package/lib/api-routes/bull-board-routes.js +1 -6
- package/lib/api-routes/export-routes.js +2 -22
- package/lib/api-routes/gateway-routes.js +5 -14
- package/lib/api-routes/index.js +1 -13
- package/lib/api-routes/mailbox-routes.js +2 -7
- package/lib/api-routes/mcp-oauth-routes.js +2 -1
- package/lib/api-routes/mcp-routes.js +7 -7
- package/lib/api-routes/message-routes.js +40 -235
- package/lib/api-routes/mint-bounds.js +110 -0
- package/lib/api-routes/oauth2-app-routes.js +23 -32
- package/lib/api-routes/operation-impact.js +1 -1
- package/lib/api-routes/outbox-routes.js +2 -2
- package/lib/api-routes/permission-map.js +1 -7
- package/lib/api-routes/route-helpers.js +11 -5
- package/lib/api-routes/settings-routes.js +19 -19
- package/lib/api-routes/stats-routes.js +1 -1
- package/lib/api-routes/submit-routes.js +17 -18
- package/lib/api-routes/template-routes.js +4 -9
- package/lib/api-routes/token-routes.js +27 -5
- package/lib/api-token-scheme.js +71 -0
- package/lib/arf-detect.js +33 -6
- package/lib/auth-token.js +44 -24
- package/lib/autodetect-imap-settings.js +163 -123
- package/lib/bounce-detect.js +25 -16
- package/lib/calendar-event.js +78 -0
- package/lib/consts.js +42 -5
- package/lib/create-imap-client.js +24 -0
- package/lib/db.js +76 -11
- package/lib/delivery-error.js +2 -1
- package/lib/egress-fetch.js +54 -3
- package/lib/egress-filter.js +11 -0
- package/lib/email-client/api-retry.js +147 -0
- package/lib/email-client/base-client.js +377 -523
- package/lib/email-client/gmail/gmail-api.js +38 -125
- package/lib/email-client/gmail/send-request.js +1 -1
- package/lib/email-client/gmail-client.js +76 -50
- package/lib/email-client/imap/mailbox.js +158 -324
- package/lib/email-client/imap/stale-view.js +109 -0
- package/lib/email-client/imap/subconnection.js +46 -9
- package/lib/email-client/imap/sync-operations.js +5 -37
- package/lib/email-client/imap-client.js +188 -64
- package/lib/email-client/message-builder.js +9 -14
- package/lib/email-client/notification-handler.js +5 -219
- package/lib/email-client/outlook/graph-api.js +147 -126
- package/lib/email-client/outlook/send-request.js +10 -4
- package/lib/email-client/outlook-client.js +194 -397
- package/lib/email-client/smtp-pool-manager.js +3 -2
- package/lib/encrypt.js +184 -19
- package/lib/enum-descriptions.js +1 -2
- package/lib/export.js +133 -39
- package/lib/gateway.js +20 -6
- package/lib/get-raw-email.js +26 -44
- package/lib/handlebars-helpers.js +31 -10
- package/lib/imap-proxy-auth.js +13 -29
- package/lib/imapproxy/imap-core/README.md +1 -0
- package/lib/imapproxy/imap-core/lib/handler/imap-parser.js +12 -0
- package/lib/imapproxy/imap-core/lib/imap-command.js +74 -10
- package/lib/imapproxy/imap-core/lib/imap-connection.js +9 -1
- package/lib/imapproxy/imap-core/lib/imap-server.js +112 -26
- package/lib/imapproxy/imap-core/lib/imap-stream.js +41 -1
- package/lib/imapproxy/imap-core/lib/imap-tools.js +10 -2
- package/lib/imapproxy/imap-core/lib/indexer/indexer.js +4 -2
- package/lib/imapproxy/imap-server.js +17 -177
- package/lib/imapproxy/proxy-handoff.js +235 -0
- package/lib/imapproxy/response-error.js +33 -0
- package/lib/imapproxy/upstream-client.js +2 -2
- package/lib/license-beacon.js +3 -9
- package/lib/llm-pre-process.js +182 -43
- package/lib/logger.js +1 -1
- package/lib/lua/ee-export-queue-add.lua +39 -0
- package/lib/lua/ee-get-idempotency.lua +15 -3
- package/lib/lua/ee-release-attempts.lua +23 -0
- package/lib/lua/ee-reserve-attempts.lua +42 -0
- package/lib/lua/h-set-bigger.lua +12 -2
- package/lib/lua/s-list-accounts.lua +6 -3
- package/lib/mcp/index.js +1 -2
- package/lib/mcp/listen.js +221 -18
- package/lib/mcp/oauth.js +44 -5
- package/lib/mcp/resources.js +8 -2
- package/lib/mcp/tools.js +13 -0
- package/lib/message-port-stream.js +64 -6
- package/lib/oauth/external-account-signer.js +16 -13
- package/lib/oauth/gmail.js +22 -20
- package/lib/oauth/outlook.js +19 -16
- package/lib/oauth/pubsub/google.js +38 -2
- package/lib/oauth/scope-checker.js +4 -7
- package/lib/oauth/verify-app.js +2 -2
- package/lib/oauth2-apps.js +139 -44
- package/lib/openapi/build-document.js +1 -1
- package/lib/openapi/joi-schema.js +78 -9
- package/lib/parse-message.js +21 -0
- package/lib/payload-examples-webhooks.json +4 -7
- package/lib/pbkdf2-phc.js +101 -0
- package/lib/privileged-settings.js +0 -14
- package/lib/rate-limit.js +54 -15
- package/lib/redis-scan-delete.js +56 -29
- package/lib/redis-url.js +3 -1
- package/lib/respawn-backoff.js +5 -4
- package/lib/response-stream.js +25 -4
- package/lib/rewrite-text-nodes.js +27 -40
- package/lib/routes-ui.js +0 -5
- package/lib/schemas.js +122 -242
- package/lib/sentry.js +21 -5
- package/lib/settings.js +58 -59
- package/lib/smtp-auth.js +6 -2
- package/lib/smtp-message-processor.js +28 -7
- package/lib/sso.js +7 -3
- package/lib/stream-encrypt.js +14 -13
- package/lib/swagger-options.js +3 -1
- package/lib/tls/provision.js +69 -3
- package/lib/tls/store.js +14 -1
- package/lib/tools.js +113 -52
- package/lib/totp.js +16 -1
- package/lib/ui-routes/account-routes.js +27 -63
- package/lib/ui-routes/admin-config-routes.js +111 -134
- package/lib/ui-routes/admin-entities-routes.js +101 -191
- package/lib/ui-routes/ai-options.js +104 -0
- package/lib/ui-routes/auth-routes.js +98 -18
- package/lib/ui-routes/export-routes.js +3 -23
- package/lib/ui-routes/internals-routes.js +12 -9
- package/lib/ui-routes/network-config-routes.js +8 -18
- package/lib/ui-routes/oauth-config-routes.js +80 -214
- package/lib/ui-routes/route-helpers.js +40 -44
- package/lib/ui-routes/unsubscribe-routes.js +2 -2
- package/lib/utils/decode-headers.js +32 -5
- package/lib/utils/header-map.js +62 -1
- package/lib/utils/network.js +2 -0
- package/lib/web-safe-html.js +77 -4
- package/lib/webhook-request.js +9 -1
- package/lib/webhook-routing.js +27 -1
- package/lib/webhooks.js +120 -43
- package/lib/worker-rpc-error.js +43 -2
- package/list-generate.js +13 -2
- package/package.json +33 -41
- package/sbom.json +1 -1
- package/scripts/refresh-test-tokens.js +42 -14
- package/server.js +317 -289
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +7 -8
- package/static/js/ee-client.js +145 -70
- package/static/js/ui.js +350 -154
- package/static/licenses.html +434 -1835
- package/translations/messages.pot +97 -97
- package/views/accounts/browse.hbs +10 -4
- package/views/config/ai.hbs +49 -41
- package/views/config/oauth/app.hbs +2 -1
- package/views/dashboard.hbs +18 -16
- package/views/layout/app.hbs +0 -22
- package/views/layout/login.hbs +2 -1
- package/views/partials/filter_editor_js.hbs +4 -3
- package/views/partials/side_menu.hbs +0 -4
- package/views/partials/ui/account-picker.hbs +6 -32
- package/views/partials/ui/model-picker.hbs +31 -0
- package/views/partials/ui/pagination.hbs +6 -1
- package/views/partials/ui/picker.hbs +47 -0
- package/views/unsubscribe.hbs +1 -1
- package/workers/api.js +20 -20
- package/workers/export.js +55 -60
- package/workers/imap.js +126 -46
- package/workers/submit.js +3 -1
- package/workers/webhooks.js +46 -27
- package/.githooks/pre-commit +0 -80
- package/.github/CODE_OF_CONDUCT.md +0 -76
- package/.github/contributing.md +0 -17
- package/.github/dependabot.yml +0 -22
- package/.github/docker-smoke-test.sh +0 -61
- package/.github/workflows/deploy.yml +0 -215
- package/.github/workflows/e2e.yml +0 -55
- package/.github/workflows/release.yaml +0 -217
- package/.github/workflows/test.yml +0 -307
- package/lib/api-routes/chat-routes.js +0 -535
- package/lib/document-store.js +0 -75
- package/lib/es.js +0 -757
- package/lib/generate-text-preview.js +0 -61
- package/lib/imapproxy/imap-core/memory-notifier.js +0 -129
- package/lib/pre-process.js +0 -196
- package/lib/threads.js +0 -155
- package/lib/ui-routes/document-store-routes.js +0 -806
- package/playwright.config.js +0 -47
- package/views/config/document-store/chat.hbs +0 -286
- package/views/config/document-store/index.hbs +0 -146
- package/views/config/document-store/mappings/index.hbs +0 -108
- package/views/config/document-store/mappings/new.hbs +0 -68
- package/views/config/document-store/pre-processing/index.hbs +0 -103
- package/views/partials/document_store_header.hbs +0 -30
- package/workers/documents.js +0 -1128
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
name: Run Tests
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
pull_request:
|
|
6
|
-
|
|
7
|
-
permissions:
|
|
8
|
-
contents: read
|
|
9
|
-
|
|
10
|
-
concurrency:
|
|
11
|
-
group: ${{ github.workflow }}-${{ github.ref }}
|
|
12
|
-
cancel-in-progress: true
|
|
13
|
-
|
|
14
|
-
jobs:
|
|
15
|
-
# Skip CI for release-please's auto-generated release PR / branch: it only bumps the
|
|
16
|
-
# version + CHANGELOG (no code change), so re-running the suite is wasted work. This is
|
|
17
|
-
# gated per job rather than with [skip ci] in the release commit, because that text would
|
|
18
|
-
# ride the squash-merge into master and skip the Manage Release run, breaking releases.
|
|
19
|
-
license_check:
|
|
20
|
-
name: License Compliance Check
|
|
21
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
22
|
-
runs-on: ubuntu-24.04
|
|
23
|
-
# Service containers to run with `container-job`
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v6
|
|
26
|
-
|
|
27
|
-
- name: Use Node.js 24
|
|
28
|
-
uses: actions/setup-node@v6
|
|
29
|
-
with:
|
|
30
|
-
node-version: 24
|
|
31
|
-
cache: npm
|
|
32
|
-
- run: npm install
|
|
33
|
-
|
|
34
|
-
- name: Run License Checks
|
|
35
|
-
run: |
|
|
36
|
-
npm run licenses
|
|
37
|
-
|
|
38
|
-
lint:
|
|
39
|
-
name: Lint
|
|
40
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
41
|
-
runs-on: ubuntu-24.04
|
|
42
|
-
timeout-minutes: 10
|
|
43
|
-
steps:
|
|
44
|
-
- uses: actions/checkout@v6
|
|
45
|
-
- name: Use Node.js 24
|
|
46
|
-
uses: actions/setup-node@v6
|
|
47
|
-
with:
|
|
48
|
-
node-version: 24
|
|
49
|
-
cache: npm
|
|
50
|
-
- run: npm install
|
|
51
|
-
- name: Run ESLint
|
|
52
|
-
run: |
|
|
53
|
-
npm run lint
|
|
54
|
-
|
|
55
|
-
unit:
|
|
56
|
-
name: Unit Tests
|
|
57
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
58
|
-
timeout-minutes: 10
|
|
59
|
-
runs-on: ubuntu-24.04
|
|
60
|
-
# Service containers to run with `container-job`
|
|
61
|
-
services:
|
|
62
|
-
# Label used to access the service container
|
|
63
|
-
redis:
|
|
64
|
-
# Docker Hub image
|
|
65
|
-
image: redis
|
|
66
|
-
# Set health checks to wait until redis has started
|
|
67
|
-
options: >-
|
|
68
|
-
--health-cmd "redis-cli ping"
|
|
69
|
-
--health-interval 10s
|
|
70
|
-
--health-timeout 5s
|
|
71
|
-
--health-retries 5
|
|
72
|
-
ports:
|
|
73
|
-
- 6379:6379
|
|
74
|
-
steps:
|
|
75
|
-
- uses: actions/checkout@v6
|
|
76
|
-
- name: Use Node.js 24
|
|
77
|
-
uses: actions/setup-node@v6
|
|
78
|
-
with:
|
|
79
|
-
node-version: 24
|
|
80
|
-
cache: npm
|
|
81
|
-
- run: npm install
|
|
82
|
-
- name: Run unit tests
|
|
83
|
-
run: |
|
|
84
|
-
npm run test:unit
|
|
85
|
-
env:
|
|
86
|
-
NODE_ENV: test
|
|
87
|
-
# account-revoke-on-delete-test.js runs against live Gmail when
|
|
88
|
-
# these are present and skips itself when they are not
|
|
89
|
-
GMAIL_API_PROJECT_ID: ${{ secrets.TEST_GMAIL_API_PROJECT_ID }}
|
|
90
|
-
GMAIL_API_CLIENT_ID: ${{ secrets.TEST_GMAIL_API_CLIENT_ID }}
|
|
91
|
-
GMAIL_API_CLIENT_SECRET: ${{ secrets.TEST_GMAIL_API_CLIENT_SECRET }}
|
|
92
|
-
GMAIL_API_SERVICE_EMAIL: ${{ secrets.TEST_GMAIL_API_SERVICE_EMAIL }}
|
|
93
|
-
GMAIL_API_SERVICE_CLIENT: ${{ secrets.TEST_GMAIL_API_SERVICE_CLIENT }}
|
|
94
|
-
GMAIL_API_SERVICE_KEY: ${{ secrets.TEST_GMAIL_API_SERVICE_KEY }}
|
|
95
|
-
GMAIL_API_ACCOUNT_EMAIL_1: ${{ secrets.TEST_GMAIL_API_ACCOUNT_EMAIL_1 }}
|
|
96
|
-
GMAIL_API_ACCOUNT_REFRESH_1: ${{ secrets.TEST_GMAIL_API_ACCOUNT_REFRESH_1 }}
|
|
97
|
-
|
|
98
|
-
dovecot:
|
|
99
|
-
# Live IMAP tier against a real IMAP4rev2 server (Dovecot 2.4 in Docker);
|
|
100
|
-
# fully hermetic - needs no external mail accounts. See test/dovecot/README.md
|
|
101
|
-
name: Live Dovecot Tests (IMAP4rev2)
|
|
102
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
103
|
-
timeout-minutes: 15
|
|
104
|
-
runs-on: ubuntu-24.04
|
|
105
|
-
services:
|
|
106
|
-
redis:
|
|
107
|
-
image: redis
|
|
108
|
-
options: >-
|
|
109
|
-
--health-cmd "redis-cli ping"
|
|
110
|
-
--health-interval 10s
|
|
111
|
-
--health-timeout 5s
|
|
112
|
-
--health-retries 5
|
|
113
|
-
ports:
|
|
114
|
-
- 6379:6379
|
|
115
|
-
steps:
|
|
116
|
-
- uses: actions/checkout@v6
|
|
117
|
-
- name: Use Node.js 24
|
|
118
|
-
uses: actions/setup-node@v6
|
|
119
|
-
with:
|
|
120
|
-
node-version: 24
|
|
121
|
-
cache: npm
|
|
122
|
-
- run: npm install
|
|
123
|
-
- name: Run live Dovecot tests
|
|
124
|
-
run: |
|
|
125
|
-
npm run test:dovecot
|
|
126
|
-
env:
|
|
127
|
-
EENGINE_DOVECOT_PLATFORM: linux/amd64
|
|
128
|
-
|
|
129
|
-
# Nothing else in CI bundles a binary, so pkg failures used to surface only when a release
|
|
130
|
-
# was cut by hand on a Mac - the one place they are most expensive and least expected. Two
|
|
131
|
-
# landed in a single day: a local helper named `require` in lib/openapi/ that pkg's module
|
|
132
|
-
# walker choked on (undetectable by any test, since it runs correctly under Node), and a
|
|
133
|
-
# dependency shipping a 0-byte ESM entry point that esbuild transformed to nothing. The
|
|
134
|
-
# first sat undetected for four days and would have broken the next release outright.
|
|
135
|
-
#
|
|
136
|
-
# One target, unsigned, uncompressed. Signing and notarization need Apple credentials and
|
|
137
|
-
# stay on the release machine; neither has any bearing on whether the bundle can be built.
|
|
138
|
-
# The image ships an OS and a Node runtime we do not build, so its vulnerabilities arrive on
|
|
139
|
-
# someone else's schedule rather than in a diff. Nothing watched that before, and the base pin
|
|
140
|
-
# sat unmoved for 19 months while 21 Alpine CVEs accumulated behind it.
|
|
141
|
-
#
|
|
142
|
-
# Scoped to fixed HIGH/CRITICAL on purpose. An unfixed upstream CVE is not actionable here and
|
|
143
|
-
# would block unrelated work at random; once a fix exists, a rebuild picks it up through
|
|
144
|
-
# `apk upgrade`, or the base pin needs moving - both of which are on us.
|
|
145
|
-
docker_scan:
|
|
146
|
-
name: Docker Image Scan
|
|
147
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
148
|
-
runs-on: ubuntu-24.04
|
|
149
|
-
timeout-minutes: 20
|
|
150
|
-
steps:
|
|
151
|
-
- uses: actions/checkout@v6
|
|
152
|
-
|
|
153
|
-
# Single arch: the findings are properties of the base image and the lockfile, neither of
|
|
154
|
-
# which differs per architecture, so scanning both legs would only double the runtime.
|
|
155
|
-
- name: Build the image
|
|
156
|
-
uses: docker/build-push-action@v7
|
|
157
|
-
with:
|
|
158
|
-
context: .
|
|
159
|
-
platforms: linux/amd64
|
|
160
|
-
load: true
|
|
161
|
-
tags: emailengine:scan
|
|
162
|
-
build-args: |
|
|
163
|
-
EE_COMMIT_HASH=${{ github.sha }}
|
|
164
|
-
|
|
165
|
-
- name: Scan for known vulnerabilities
|
|
166
|
-
uses: aquasecurity/trivy-action@v0.36.0
|
|
167
|
-
with:
|
|
168
|
-
image-ref: emailengine:scan
|
|
169
|
-
scanners: vuln
|
|
170
|
-
severity: HIGH,CRITICAL
|
|
171
|
-
ignore-unfixed: true
|
|
172
|
-
exit-code: '1'
|
|
173
|
-
format: table
|
|
174
|
-
env:
|
|
175
|
-
# Trivy pulls its database from ghcr.io and is rate limited unauthenticated
|
|
176
|
-
TRIVY_USERNAME: ${{ github.actor }}
|
|
177
|
-
TRIVY_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
178
|
-
|
|
179
|
-
pkg_build:
|
|
180
|
-
name: Binary Build (linux-x64, unsigned)
|
|
181
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
182
|
-
timeout-minutes: 20
|
|
183
|
-
runs-on: ubuntu-24.04
|
|
184
|
-
services:
|
|
185
|
-
redis:
|
|
186
|
-
image: redis
|
|
187
|
-
options: >-
|
|
188
|
-
--health-cmd "redis-cli ping"
|
|
189
|
-
--health-interval 10s
|
|
190
|
-
--health-timeout 5s
|
|
191
|
-
--health-retries 5
|
|
192
|
-
ports:
|
|
193
|
-
- 6379:6379
|
|
194
|
-
steps:
|
|
195
|
-
- uses: actions/checkout@v6
|
|
196
|
-
- name: Use Node.js 24
|
|
197
|
-
uses: actions/setup-node@v6
|
|
198
|
-
with:
|
|
199
|
-
node-version: 24
|
|
200
|
-
cache: npm
|
|
201
|
-
|
|
202
|
-
# Unpinned on purpose, matching upload.sh: releases are built with whatever pkg is
|
|
203
|
-
# current, so a pkg regression should fail here rather than mid-release.
|
|
204
|
-
- name: Install pkg
|
|
205
|
-
run: npm install -g @yao-pkg/pkg
|
|
206
|
-
|
|
207
|
-
# The real production tree rather than a dev install. That distinction matters: the
|
|
208
|
-
# empty-ESM-file failure only exists under `npm ci --omit=dev`, and
|
|
209
|
-
# prepare-bundle-deps.sh, which works around it, only runs from this script.
|
|
210
|
-
- name: Build the production source tree
|
|
211
|
-
run: npm run build-source
|
|
212
|
-
|
|
213
|
-
# Uncompressed - Brotli is minutes of CPU that changes nothing about the module
|
|
214
|
-
# resolution this job exists to exercise. `--output` ignores the `outputPath` in
|
|
215
|
-
# package.json, so it names the directory itself; ee-dist is already gitignored,
|
|
216
|
-
# which keeps a stray 260 MB binary out of the way when running this locally.
|
|
217
|
-
- name: Bundle a binary
|
|
218
|
-
run: |
|
|
219
|
-
mkdir -p ee-dist
|
|
220
|
-
pkg --target node24-linux-x64 --output ee-dist/emailengine-ci package.json
|
|
221
|
-
|
|
222
|
-
- name: Smoke test the CLI
|
|
223
|
-
run: |
|
|
224
|
-
./ee-dist/emailengine-ci --version
|
|
225
|
-
./ee-dist/emailengine-ci help > /dev/null
|
|
226
|
-
|
|
227
|
-
# Booting reaches past what the CLI touches: workers, and the views, static files and
|
|
228
|
-
# lua scripts that are bundled as pkg assets rather than resolved as modules, so a
|
|
229
|
-
# missing asset shows up here instead of in a released binary.
|
|
230
|
-
- name: Boot the binary and check it serves
|
|
231
|
-
env:
|
|
232
|
-
EENGINE_REDIS: redis://127.0.0.1:6379/12
|
|
233
|
-
EENGINE_PORT: 7311
|
|
234
|
-
EENGINE_HOST: 127.0.0.1
|
|
235
|
-
EENGINE_LOG_LEVEL: error
|
|
236
|
-
run: |
|
|
237
|
-
./ee-dist/emailengine-ci &
|
|
238
|
-
for i in $(seq 1 60); do
|
|
239
|
-
if curl -fsS http://127.0.0.1:7311/health >/dev/null 2>&1; then
|
|
240
|
-
echo "binary booted and served /health"
|
|
241
|
-
curl -fsS -o /dev/null http://127.0.0.1:7311/swagger.json
|
|
242
|
-
echo "generated document served"
|
|
243
|
-
exit 0
|
|
244
|
-
fi
|
|
245
|
-
sleep 2
|
|
246
|
-
done
|
|
247
|
-
echo "binary never became healthy" >&2
|
|
248
|
-
exit 1
|
|
249
|
-
|
|
250
|
-
integration:
|
|
251
|
-
name: Integration Tests
|
|
252
|
-
if: ${{ !startsWith(github.ref_name, 'release-please--') && !startsWith(github.head_ref, 'release-please--') }}
|
|
253
|
-
timeout-minutes: 15 # Increased timeout for Gmail API tests
|
|
254
|
-
runs-on: ubuntu-24.04
|
|
255
|
-
# Service containers to run with `container-job`
|
|
256
|
-
services:
|
|
257
|
-
# Label used to access the service container
|
|
258
|
-
redis:
|
|
259
|
-
# Docker Hub image
|
|
260
|
-
image: redis
|
|
261
|
-
# Set health checks to wait until redis has started
|
|
262
|
-
options: >-
|
|
263
|
-
--health-cmd "redis-cli ping"
|
|
264
|
-
--health-interval 10s
|
|
265
|
-
--health-timeout 5s
|
|
266
|
-
--health-retries 5
|
|
267
|
-
ports:
|
|
268
|
-
- 6379:6379
|
|
269
|
-
steps:
|
|
270
|
-
- uses: actions/checkout@v6
|
|
271
|
-
- name: Use Node.js 24
|
|
272
|
-
uses: actions/setup-node@v6
|
|
273
|
-
with:
|
|
274
|
-
node-version: 24
|
|
275
|
-
cache: npm
|
|
276
|
-
- run: npm install
|
|
277
|
-
- name: Run integration tests
|
|
278
|
-
run: |
|
|
279
|
-
npm run test:integration
|
|
280
|
-
env:
|
|
281
|
-
NODE_ENV: test
|
|
282
|
-
GMAIL_API_PROJECT_ID: ${{ secrets.TEST_GMAIL_API_PROJECT_ID }}
|
|
283
|
-
GMAIL_API_CLIENT_ID: ${{ secrets.TEST_GMAIL_API_CLIENT_ID }}
|
|
284
|
-
GMAIL_API_CLIENT_SECRET: ${{ secrets.TEST_GMAIL_API_CLIENT_SECRET }}
|
|
285
|
-
GMAIL_API_SERVICE_EMAIL: ${{ secrets.TEST_GMAIL_API_SERVICE_EMAIL }}
|
|
286
|
-
GMAIL_API_SERVICE_CLIENT: ${{ secrets.TEST_GMAIL_API_SERVICE_CLIENT }}
|
|
287
|
-
GMAIL_API_SERVICE_KEY: ${{ secrets.TEST_GMAIL_API_SERVICE_KEY }}
|
|
288
|
-
GMAIL_API_ACCOUNT_EMAIL_1: ${{ secrets.TEST_GMAIL_API_ACCOUNT_EMAIL_1 }}
|
|
289
|
-
GMAIL_API_ACCOUNT_REFRESH_1: ${{ secrets.TEST_GMAIL_API_ACCOUNT_REFRESH_1 }}
|
|
290
|
-
GMAIL_API_ACCOUNT_EMAIL_2: ${{ secrets.TEST_GMAIL_API_ACCOUNT_EMAIL_2 }}
|
|
291
|
-
GMAIL_API_ACCOUNT_REFRESH_2: ${{ secrets.TEST_GMAIL_API_ACCOUNT_REFRESH_2 }}
|
|
292
|
-
GMAIL_SENDONLY_PROJECT_ID: ${{ secrets.GMAIL_SENDONLY_PROJECT_ID }}
|
|
293
|
-
GMAIL_SENDONLY_CLIENT_ID: ${{ secrets.GMAIL_SENDONLY_CLIENT_ID }}
|
|
294
|
-
GMAIL_SENDONLY_CLIENT_SECRET: ${{ secrets.GMAIL_SENDONLY_CLIENT_SECRET }}
|
|
295
|
-
GMAIL_SENDONLY_ACCOUNT_EMAIL: ${{ secrets.GMAIL_SENDONLY_ACCOUNT_EMAIL }}
|
|
296
|
-
GMAIL_SENDONLY_ACCOUNT_REFRESH: ${{ secrets.GMAIL_SENDONLY_ACCOUNT_REFRESH }}
|
|
297
|
-
OUTLOOK_SERVICE_CLIENT_ID: ${{ secrets.OUTLOOK_SERVICE_CLIENT_ID }}
|
|
298
|
-
OUTLOOK_SERVICE_TENANT_ID: ${{ secrets.OUTLOOK_SERVICE_TENANT_ID }}
|
|
299
|
-
OUTLOOK_SERVICE_CLIENT_SECRET: ${{ secrets.OUTLOOK_SERVICE_CLIENT_SECRET }}
|
|
300
|
-
OUTLOOK_SERVICE_ACCOUNT_EMAIL: ${{ secrets.OUTLOOK_SERVICE_ACCOUNT_EMAIL }}
|
|
301
|
-
GMAIL_SERVICE_POSTALSYS_CLIENT: ${{ secrets.GMAIL_SERVICE_POSTALSYS_CLIENT }}
|
|
302
|
-
GMAIL_SERVICE_POSTALSYS_SERVICE_EMAIL: ${{ secrets.GMAIL_SERVICE_POSTALSYS_SERVICE_EMAIL }}
|
|
303
|
-
GMAIL_SERVICE_POSTALSYS_KEY: ${{ secrets.GMAIL_SERVICE_POSTALSYS_KEY }}
|
|
304
|
-
GMAIL_SERVICE_POSTALSYS_ACCOUNT_EMAIL: ${{ secrets.GMAIL_SERVICE_POSTALSYS_ACCOUNT_EMAIL }}
|
|
305
|
-
GMAIL_WIF_SA_KEY: ${{ secrets.GMAIL_WIF_SA_KEY }}
|
|
306
|
-
GMAIL_WIF_AUDIENCE: ${{ secrets.GMAIL_WIF_AUDIENCE }}
|
|
307
|
-
GMAIL_WIF_ACCOUNT_EMAIL: ${{ secrets.GMAIL_WIF_ACCOUNT_EMAIL }}
|