Compare commits

...

92 Commits

Author SHA1 Message Date
standardci
d2efa73fd7 chore(release): publish new version
- @standardnotes/analytics@2.28.4
 - @standardnotes/api-gateway@1.78.1
 - @standardnotes/auth-server@1.154.0
 - @standardnotes/domain-events-infra@1.16.0
 - @standardnotes/event-store@1.12.14
 - @standardnotes/files-server@1.28.0
 - @standardnotes/home-server@1.16.39
 - @standardnotes/revisions-server@1.42.0
 - @standardnotes/scheduler-server@1.22.4
 - @standardnotes/syncing-server@1.114.0
 - @standardnotes/websockets-server@1.14.0
2023-10-09 12:49:25 +00:00
Karol Sójko
b47c80cccd feat(domain-events-infra): add express instrumentation 2023-10-09 14:30:51 +02:00
Karol Sójko
b72e515931 feat(domain-events-infra): add ioredis instrumentation 2023-10-09 14:22:24 +02:00
Karol Sójko
65fcc657a7 feat(domain-events-infra): add winston instrumentation 2023-10-09 14:16:25 +02:00
Karol Sójko
65ced2cc7b feat: add custom tracing on workers 2023-10-09 14:08:35 +02:00
standardci
af17698334 chore(release): publish new version
- @standardnotes/analytics@2.28.3
 - @standardnotes/api-gateway@1.78.0
 - @standardnotes/auth-server@1.153.0
 - @standardnotes/domain-events-infra@1.15.0
 - @standardnotes/event-store@1.12.13
 - @standardnotes/files-server@1.27.0
 - @standardnotes/home-server@1.16.38
 - @standardnotes/revisions-server@1.41.0
 - @standardnotes/scheduler-server@1.22.3
 - @standardnotes/syncing-server@1.113.0
 - @standardnotes/websockets-server@1.13.0
2023-10-09 10:33:23 +00:00
Karol Sójko
5e930d08eb feat: add opentelemetry to all services 2023-10-09 12:15:12 +02:00
Karol Sójko
0c89d8bd2d fix(revisions): instrumenting opentelemetry on non production 2023-10-09 11:36:40 +02:00
Karol Sójko
cb23506c1f fix: checksums on packages 2023-10-09 11:21:22 +02:00
Karol Sójko
bf9072dbd4 fix(revisions): add trace id sampler 2023-10-09 11:18:52 +02:00
Karol Sójko
6abdd73a31 feat(revisions): switch to open telemetry 2023-10-09 11:11:55 +02:00
standardci
421b5c5487 chore(release): publish new version
- @standardnotes/home-server@1.16.37
 - @standardnotes/revisions-server@1.40.4
2023-10-09 08:35:11 +00:00
Karol Sójko
465530841f fix(revisions): creation date formatting 2023-10-09 10:15:20 +02:00
standardci
0057a5d6ff chore(release): publish new version
- @standardnotes/analytics@2.28.2
 - @standardnotes/api-gateway@1.77.2
 - @standardnotes/auth-server@1.152.2
 - @standardnotes/domain-events-infra@1.14.9
 - @standardnotes/event-store@1.12.12
 - @standardnotes/files-server@1.26.4
 - @standardnotes/home-server@1.16.36
 - @standardnotes/revisions-server@1.40.3
 - @standardnotes/scheduler-server@1.22.2
 - @standardnotes/syncing-server@1.112.4
 - @standardnotes/websockets-server@1.12.1
2023-10-09 08:12:19 +00:00
Karol Sójko
b736dab3c1 fix: remove xray sdk in favor of opentelemetry 2023-10-09 09:53:34 +02:00
standardci
951d965304 chore(release): publish new version
- @standardnotes/home-server@1.16.35
 - @standardnotes/revisions-server@1.40.2
 - @standardnotes/syncing-server@1.112.3
2023-10-09 06:45:04 +00:00
Karol Sójko
29e8de3238 fix: logs in transition 2023-10-09 08:26:18 +02:00
standardci
eeeacabaa8 chore(release): publish new version
- @standardnotes/home-server@1.16.34
 - @standardnotes/syncing-server@1.112.2
2023-10-06 14:30:24 +00:00
Karol Sójko
51ca8229b8 fix(syncing-server): calling auth server for user key params 2023-10-06 15:56:10 +02:00
Karol Sójko
a6a19a391e fix(syncing-server): error log on email backup requested 2023-10-06 15:44:11 +02:00
standardci
f6cdb7916c chore(release): publish new version
- @standardnotes/auth-server@1.152.1
 - @standardnotes/home-server@1.16.33
 - @standardnotes/revisions-server@1.40.1
 - @standardnotes/syncing-server@1.112.1
2023-10-06 13:34:07 +00:00
Karol Sójko
eafb064d79 fix(syncing-server): increase axios timeout on calling auth 2023-10-06 15:18:26 +02:00
Karol Sójko
ba050681f7 fix(syncing-server): logs on request backup handler 2023-10-06 15:16:38 +02:00
Karol Sójko
4780629549 fix(revisions): casting creation date from MongoDB 2023-10-06 15:14:11 +02:00
Karol Sójko
79a44aa51f fix(auth): checking for transition role when triggering transition 2023-10-06 14:56:45 +02:00
standardci
dd72769841 chore(release): publish new version
- @standardnotes/auth-server@1.152.0
 - @standardnotes/home-server@1.16.32
 - @standardnotes/revisions-server@1.40.0
 - @standardnotes/syncing-server@1.112.0
2023-10-06 11:22:47 +00:00
Karol Sójko
d8f1c66fd5 fix: enable TransitionRequestedEventHandler 2023-10-06 13:02:37 +02:00
Karol Sójko
afe9967d26 fix(auth): strip user from transition role after migration 2023-10-06 12:59:18 +02:00
Karol Sójko
27bea444cc feat: switch transition direction 2023-10-06 12:48:08 +02:00
standardci
7a571dec0a chore(release): publish new version
- @standardnotes/home-server@1.16.31
 - @standardnotes/syncing-server@1.111.5
2023-10-06 08:48:31 +00:00
Karol Sójko
8c57f505be fix(syncing-server): add more logs on successfull email backups requested 2023-10-06 10:28:50 +02:00
standardci
973612bf4f chore(release): publish new version
- @standardnotes/analytics@2.28.1
 - @standardnotes/auth-server@1.151.2
 - @standardnotes/home-server@1.16.30
 - @standardnotes/scheduler-server@1.22.1
 - @standardnotes/syncing-server@1.111.4
2023-10-06 08:01:50 +00:00
Karol Sójko
702a1286eb fix(syncing-server): error log on email backup request handler 2023-10-06 09:40:27 +02:00
Karol Sójko
a45b5b69b5 fix: add xray-sdk to background processors 2023-10-06 09:33:15 +02:00
standardci
321353f26c chore(release): publish new version
- @standardnotes/analytics@2.28.0
 - @standardnotes/api-gateway@1.77.1
 - @standardnotes/auth-server@1.151.1
 - @standardnotes/domain-core@1.35.0
 - @standardnotes/domain-events-infra@1.14.8
 - @standardnotes/event-store@1.12.11
 - @standardnotes/files-server@1.26.3
 - @standardnotes/home-server@1.16.29
 - @standardnotes/revisions-server@1.39.5
 - @standardnotes/scheduler-server@1.22.0
 - @standardnotes/settings@1.21.43
 - @standardnotes/syncing-server@1.111.3
 - @standardnotes/websockets-server@1.12.0
2023-10-06 05:44:00 +00:00
Karol Sójko
db4607d4aa chore: upgrade sqs-consumer 2023-10-06 07:26:59 +02:00
Karol Sójko
f0531d68cb feat: add xray to analytics scheduler and websockets 2023-10-06 07:23:06 +02:00
Karol Sójko
8a00d159a6 Revert "fix: naming of segments for sqs handlers"
This reverts commit d244cc0d5f.
2023-10-06 06:50:14 +02:00
Karol Sójko
d244cc0d5f fix: naming of segments for sqs handlers 2023-10-05 18:06:17 +02:00
standardci
6a2aa4b148 chore(release): publish new version
- @standardnotes/api-gateway@1.77.0
 - @standardnotes/auth-server@1.151.0
 - @standardnotes/home-server@1.16.28
2023-10-05 14:42:25 +00:00
Karol Sójko
3ee49416f8 feat: setting xray segment user on api-gateway level 2023-10-05 16:25:09 +02:00
standardci
ae1e86e19f chore(release): publish new version
- @standardnotes/home-server@1.16.27
 - @standardnotes/revisions-server@1.39.4
2023-10-05 13:20:33 +00:00
Karol Sójko
9f76e389e2 fix(revisions): capture mysql to xray 2023-10-05 13:22:39 +02:00
standardci
6e2240e60c chore(release): publish new version
- @standardnotes/analytics@2.27.10
 - @standardnotes/api-gateway@1.76.2
 - @standardnotes/auth-server@1.150.9
 - @standardnotes/domain-events-infra@1.14.7
 - @standardnotes/event-store@1.12.10
 - @standardnotes/files-server@1.26.2
 - @standardnotes/home-server@1.16.26
 - @standardnotes/revisions-server@1.39.3
 - @standardnotes/scheduler-server@1.21.10
 - @standardnotes/syncing-server@1.111.2
 - @standardnotes/websockets-server@1.11.10
2023-10-05 07:17:33 +00:00
Karol Sójko
cd37c951bb Revert "fix(domain-events-infra): setting user metadata on workers"
This reverts commit c4b6f17ebc.
2023-10-05 09:00:47 +02:00
standardci
c4c3dfb823 chore(release): publish new version
- @standardnotes/analytics@2.27.9
 - @standardnotes/api-gateway@1.76.1
 - @standardnotes/auth-server@1.150.8
 - @standardnotes/domain-events-infra@1.14.6
 - @standardnotes/event-store@1.12.9
 - @standardnotes/files-server@1.26.1
 - @standardnotes/home-server@1.16.25
 - @standardnotes/revisions-server@1.39.2
 - @standardnotes/scheduler-server@1.21.9
 - @standardnotes/syncing-server@1.111.1
 - @standardnotes/websockets-server@1.11.9
2023-10-05 05:36:39 +00:00
Karol Sójko
c4b6f17ebc fix(domain-events-infra): setting user metadata on workers 2023-10-05 07:16:18 +02:00
standardci
71ce938cb1 chore(release): publish new version
- @standardnotes/api-gateway@1.76.0
 - @standardnotes/files-server@1.26.0
 - @standardnotes/home-server@1.16.24
 - @standardnotes/syncing-server@1.111.0
2023-10-04 18:03:38 +00:00
Karol Sójko
dc76113915 feat(api-gateaway): configure aws-xray-sdk 2023-10-04 19:44:25 +02:00
Karol Sójko
6583ff6cd9 feat: add xray to syncing server and files 2023-10-04 19:39:16 +02:00
standardci
69ea947857 chore(release): publish new version
- @standardnotes/analytics@2.27.8
 - @standardnotes/api-gateway@1.75.13
 - @standardnotes/auth-server@1.150.7
 - @standardnotes/domain-core@1.34.2
 - @standardnotes/domain-events-infra@1.14.5
 - @standardnotes/event-store@1.12.8
 - @standardnotes/files-server@1.25.6
 - @standardnotes/home-server@1.16.23
 - @standardnotes/revisions-server@1.39.1
 - @standardnotes/scheduler-server@1.21.8
 - @standardnotes/settings@1.21.42
 - @standardnotes/syncing-server@1.110.8
 - @standardnotes/websockets-server@1.11.8
2023-10-04 16:36:09 +00:00
Karol Sójko
eab78b3a95 fix: identifying services in workers 2023-10-04 18:13:41 +02:00
standardci
3097f7f063 chore(release): publish new version
- @standardnotes/home-server@1.16.22
 - @standardnotes/revisions-server@1.39.0
2023-10-04 15:42:53 +00:00
Karol Sójko
126989df82 feat(revisions): add aws-xray-sdk 2023-10-04 17:22:40 +02:00
Karol Sójko
a25eb178c5 chore: fix env var replacement 2023-10-04 16:43:48 +02:00
standardci
18dae26b8e chore(release): publish new version
- @standardnotes/analytics@2.27.7
 - @standardnotes/api-gateway@1.75.12
 - @standardnotes/auth-server@1.150.6
 - @standardnotes/domain-events-infra@1.14.4
 - @standardnotes/event-store@1.12.7
 - @standardnotes/files-server@1.25.5
 - @standardnotes/home-server@1.16.21
 - @standardnotes/revisions-server@1.38.10
 - @standardnotes/scheduler-server@1.21.7
 - @standardnotes/syncing-server@1.110.7
 - @standardnotes/websockets-server@1.11.7
2023-10-04 14:30:55 +00:00
Karol Sójko
5bc8157d4d chore: disable vault tests temporarily 2023-10-04 16:09:27 +02:00
Karol Sójko
f29826e917 chore: add filling in the package version 2023-10-04 16:09:15 +02:00
Karol Sójko
ba7cbb989b fix(domain-events-infra): subsegment name 2023-10-04 15:51:33 +02:00
Karol Sójko
d4579ce21e fix(auth): disable users from registering to MongoDB 2023-10-04 15:51:32 +02:00
standardci
ed14d2dfb7 chore(release): publish new version
- @standardnotes/analytics@2.27.6
 - @standardnotes/api-gateway@1.75.11
 - @standardnotes/auth-server@1.150.5
 - @standardnotes/domain-events-infra@1.14.3
 - @standardnotes/event-store@1.12.6
 - @standardnotes/files-server@1.25.4
 - @standardnotes/home-server@1.16.20
 - @standardnotes/revisions-server@1.38.9
 - @standardnotes/scheduler-server@1.21.6
 - @standardnotes/syncing-server@1.110.6
 - @standardnotes/websockets-server@1.11.6
2023-10-04 13:17:42 +00:00
Karol Sójko
64f1fe59c2 fix(domain-events-infra): remove redundant flush 2023-10-04 14:49:49 +02:00
Karol Sójko
207ef9f3e5 fix(domain-events-infra): handling segments 2023-10-04 14:47:45 +02:00
standardci
3ea0435459 chore(release): publish new version
- @standardnotes/analytics@2.27.5
 - @standardnotes/api-gateway@1.75.10
 - @standardnotes/auth-server@1.150.4
 - @standardnotes/domain-events-infra@1.14.2
 - @standardnotes/event-store@1.12.5
 - @standardnotes/files-server@1.25.3
 - @standardnotes/home-server@1.16.19
 - @standardnotes/revisions-server@1.38.8
 - @standardnotes/scheduler-server@1.21.5
 - @standardnotes/syncing-server@1.110.5
 - @standardnotes/websockets-server@1.11.5
2023-10-04 12:38:32 +00:00
Karol Sójko
7668713dd6 fix(domain-events-infra): imports 2023-10-04 14:06:47 +02:00
Karol Sójko
f6bc1c3084 fix(domain-events-infra): handling async functions 2023-10-04 14:01:46 +02:00
standardci
4203ff9a0c chore(release): publish new version
- @standardnotes/auth-server@1.150.3
 - @standardnotes/home-server@1.16.18
2023-10-04 11:48:12 +00:00
Karol Sójko
0281724196 fix(auth): remove ec2 plugin from worker 2023-10-04 13:21:14 +02:00
standardci
94bd319279 chore(release): publish new version
- @standardnotes/auth-server@1.150.2
 - @standardnotes/home-server@1.16.17
2023-10-04 11:09:36 +00:00
Karol Sójko
373cfad1f7 fix(auth): remove ec2 plugin 2023-10-04 12:42:49 +02:00
standardci
59107f8553 chore(release): publish new version
- @standardnotes/analytics@2.27.4
 - @standardnotes/api-gateway@1.75.9
 - @standardnotes/auth-server@1.150.1
 - @standardnotes/domain-events-infra@1.14.1
 - @standardnotes/event-store@1.12.4
 - @standardnotes/files-server@1.25.2
 - @standardnotes/home-server@1.16.16
 - @standardnotes/revisions-server@1.38.7
 - @standardnotes/scheduler-server@1.21.4
 - @standardnotes/syncing-server@1.110.4
 - @standardnotes/websockets-server@1.11.4
2023-10-03 13:32:00 +00:00
Karol Sójko
e066b6a126 fix(domain-events-infra): change segment closing 2023-10-03 14:57:59 +02:00
standardci
a0e4926135 chore(release): publish new version
- @standardnotes/analytics@2.27.3
 - @standardnotes/api-gateway@1.75.8
 - @standardnotes/auth-server@1.150.0
 - @standardnotes/domain-events-infra@1.14.0
 - @standardnotes/event-store@1.12.3
 - @standardnotes/files-server@1.25.1
 - @standardnotes/home-server@1.16.15
 - @standardnotes/revisions-server@1.38.6
 - @standardnotes/scheduler-server@1.21.3
 - @standardnotes/syncing-server@1.110.3
 - @standardnotes/websockets-server@1.11.3
2023-10-03 06:53:13 +00:00
Karol Sójko
b1b244a2cf feat: add xray segment tracing on auth-worker 2023-10-03 08:21:57 +02:00
standardci
b4a38d9dcc chore(release): publish new version
- @standardnotes/auth-server@1.149.1
 - @standardnotes/home-server@1.16.14
2023-10-02 15:45:45 +00:00
Karol Sójko
71e2a4187e fix(auth): enable xray only for server 2023-10-02 16:53:03 +02:00
standardci
c94f9c1a60 chore(release): publish new version
- @standardnotes/auth-server@1.149.0
 - @standardnotes/home-server@1.16.13
 - @standardnotes/revisions-server@1.38.5
 - @standardnotes/syncing-server@1.110.2
2023-10-02 13:56:17 +00:00
Karol Sójko
b9907924be chore: fix run name for e2e test suite to include suite 2023-10-02 14:37:10 +02:00
Karol Sójko
d4c188c096 feat: divide suites furthermore 2023-10-02 14:19:12 +02:00
Karol Sójko
2ccaf490df feat: divide test suites on a higher level 2023-10-02 13:47:32 +02:00
Karol Sójko
cd893b41d7 fix: temproarily disable transitions to empty overpopulated queues 2023-10-02 13:05:54 +02:00
Karol Sójko
3838358081 fix(auth): add aws xray ecs and ec2 plugins 2023-10-02 12:56:06 +02:00
Karol Sójko
1a388f00c3 feat(auth): introduce AWS X-Ray SDK (#859)
* feat(auth): configure aws-xray-sdk for express

* configured aws sdk clients

* configure setting user metadata on segment

* fix binding

* fix binding order
2023-10-02 12:52:49 +02:00
Karol Sójko
bd71422fab fix(auth): prevent from loop disabling of email settings (#858) 2023-10-02 10:56:35 +02:00
standardci
3e1697f47f chore(release): publish new version
- @standardnotes/home-server@1.16.12
 - @standardnotes/revisions-server@1.38.4
 - @standardnotes/syncing-server@1.110.1
2023-09-29 13:13:19 +00:00
Karol Sójko
032cde7723 fix: keep transition in-progress status alive 2023-09-29 14:08:31 +02:00
standardci
34b956b482 chore(release): publish new version
- @standardnotes/auth-server@1.148.2
 - @standardnotes/home-server@1.16.11
 - @standardnotes/revisions-server@1.38.3
 - @standardnotes/syncing-server@1.110.0
2023-09-29 10:23:26 +00:00
Karol Sójko
681e0378ae fix(auth): increase ttl for in progress duration of transitions 2023-09-29 11:05:54 +02:00
Karol Sójko
609e85f926 feat(syncing-server): allow surviving only upon account deletion (#857) 2023-09-29 10:51:26 +02:00
Karol Sójko
e4ca310707 fix: add paging memory to integrity check 2023-09-29 10:47:50 +02:00
standardci
d606493356 chore(release): publish new version
- @standardnotes/auth-server@1.148.1
 - @standardnotes/home-server@1.16.10
2023-09-29 08:14:08 +00:00
Karol Sójko
5ef6c5c14a fix(auth): disable transitions retriggering if they are in progress 2023-09-28 14:40:37 +02:00
216 changed files with 4804 additions and 1102 deletions

View File

@@ -7,6 +7,10 @@ on:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
secrets:
DOCKER_USERNAME:
required: true
@@ -18,158 +22,16 @@ on:
required: true
jobs:
e2e:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
matrix:
suite: ['base', 'vaults']
secondary_db_enabled: [true, false]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: mysql
CACHE_TYPE: redis
SECONDARY_DB_ENABLED: ${{ matrix.secondary_db_enabled }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ matrix.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: self-hosted-failure-logs-${{ matrix.suite }}-${{ matrix.secondary_db_enabled }}
retention-days: 5
path: |
logs/*.err
logs/*.log
e2e-self-hosted:
uses: standardnotes/server/.github/workflows/e2e-self-hosted.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag }}
suite: ${{ inputs.suite }}
secrets: inherit
e2e-home-server:
name: (Home Server) E2E Test Suite
strategy:
fail-fast: false
matrix:
suite: ['base', 'vaults']
db_type: [mysql, sqlite]
cache_type: [redis, memory]
secondary_db_enabled: [true, false]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
cache:
image: redis
ports:
- 6379:6379
db:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
secondary_db:
image: mongo:5.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: standardnotes
MONGO_INITDB_ROOT_PASSWORD: standardnotes
MONGO_INITDB_DATABASE: standardnotes
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install Dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Copy dotenv file
run: cp packages/home-server/.env.sample packages/home-server/.env
- name: Fill in env variables
run: |
sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
echo "SECONDARY_DB_ENABLED=${{ matrix.secondary_db_enabled }}" >> packages/home-server/.env
echo "MONGO_HOST=localhost" >> packages/home-server/.env
echo "MONGO_PORT=27017" >> packages/home-server/.env
echo "MONGO_DATABASE=standardnotes" >> packages/home-server/.env
echo "MONGO_USERNAME=standardnotes" >> packages/home-server/.env
echo "MONGO_PASSWORD=standardnotes" >> packages/home-server/.env
echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
echo "E2E_TESTING=true" >> packages/home-server/.env
- name: Run Server
run: nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
env:
PORT: 3123
- name: Wait for server to start
run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ matrix.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: home-server-failure-logs-${{ matrix.suite }}-${{ matrix.db_type }}-${{ matrix.cache_type }}-${{ matrix.secondary_db_enabled }}
retention-days: 5
path: |
logs/output.log
uses: standardnotes/server/.github/workflows/e2e-home-server.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag }}
suite: ${{ inputs.suite }}
secrets: inherit

128
.github/workflows/e2e-home-server.yml vendored Normal file
View File

@@ -0,0 +1,128 @@
name: E2E Home Server Test Suite
on:
workflow_call:
inputs:
snjs_image_tag:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e-home-server:
name: (Home Server) E2E Test Suite
strategy:
fail-fast: false
matrix:
db_type: [mysql, sqlite]
cache_type: [redis, memory]
secondary_db_enabled: [true, false]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
cache:
image: redis
ports:
- 6379:6379
db:
image: mysql
ports:
- 3306:3306
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: standardnotes
MYSQL_USER: standardnotes
MYSQL_PASSWORD: standardnotes
secondary_db:
image: mongo:5.0
ports:
- 27017:27017
env:
MONGO_INITDB_ROOT_USERNAME: standardnotes
MONGO_INITDB_ROOT_PASSWORD: standardnotes
MONGO_INITDB_DATABASE: standardnotes
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install Dependencies
run: yarn install --immutable
- name: Build
run: yarn build
- name: Copy dotenv file
run: cp packages/home-server/.env.sample packages/home-server/.env
- name: Fill in env variables
run: |
sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
echo "DB_HOST=localhost" >> packages/home-server/.env
echo "DB_PORT=3306" >> packages/home-server/.env
echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
echo "SECONDARY_DB_ENABLED=${{ matrix.secondary_db_enabled }}" >> packages/home-server/.env
echo "MONGO_HOST=localhost" >> packages/home-server/.env
echo "MONGO_PORT=27017" >> packages/home-server/.env
echo "MONGO_DATABASE=standardnotes" >> packages/home-server/.env
echo "MONGO_USERNAME=standardnotes" >> packages/home-server/.env
echo "MONGO_PASSWORD=standardnotes" >> packages/home-server/.env
echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
echo "E2E_TESTING=true" >> packages/home-server/.env
- name: Run Server
run: nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
env:
PORT: 3123
- name: Wait for server to start
run: for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: home-server-failure-logs-${{ inputs.suite }}-${{ matrix.db_type }}-${{ matrix.cache_type }}-${{ matrix.secondary_db_enabled }}
retention-days: 5
path: |
logs/output.log

72
.github/workflows/e2e-self-hosted.yml vendored Normal file
View File

@@ -0,0 +1,72 @@
name: E2E Self Hosted Test Suite
on:
workflow_call:
inputs:
snjs_image_tag:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
secrets:
DOCKER_USERNAME:
required: true
DOCKER_PASSWORD:
required: true
AWS_ACCESS_KEY_ID:
required: true
AWS_SECRET_ACCESS_KEY:
required: true
jobs:
e2e:
name: (Self Hosting) E2E Test Suite
strategy:
fail-fast: false
matrix:
secondary_db_enabled: [true, false]
runs-on: ubuntu-latest
services:
snjs:
image: standardnotes/snjs:${{ inputs.snjs_image_tag }}
ports:
- 9001:9001
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
registry-url: 'https://registry.npmjs.org'
node-version-file: '.nvmrc'
- name: Install
run: yarn install --immutable
- name: Run Server
run: docker compose -f docker-compose.ci.yml up -d
env:
DB_TYPE: mysql
CACHE_TYPE: redis
SECONDARY_DB_ENABLED: ${{ matrix.secondary_db_enabled }}
- name: Wait for server to start
run: docker/is-available.sh http://localhost:3123 $(pwd)/logs
- name: Run E2E Test Suite
run: yarn dlx mocha-headless-chrome --timeout 3600000 -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
- name: Archive failed run logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: self-hosted-failure-logs-${{ inputs.suite }}-${{ matrix.secondary_db_enabled }}
retention-days: 5
path: |
logs/*.err
logs/*.log

View File

@@ -1,6 +1,6 @@
name: E2E Test Suite On Self Hosted Server
name: E2E Test Suite
run-name: E2E Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
run-name: E2E ${{ inputs.suite }} Test Suite against ${{ inputs.ref_name }} by ${{ inputs.author }}
on:
schedule:
@@ -11,6 +11,10 @@ on:
type: string
default: latest
description: The Docker image tag used for SNJS container
suite:
type: string
default: all
description: The test suite to run
author:
type: string
default: unknown
@@ -26,4 +30,5 @@ jobs:
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: ${{ inputs.snjs_image_tag || 'latest' }}
suite: ${{ inputs.suite || 'all' }}
secrets: inherit

View File

@@ -95,9 +95,20 @@ jobs:
- name: Test
run: yarn test
e2e:
e2e-base:
needs: build
name: E2E
name: E2E Base Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'base'
secrets: inherit
# e2e-vaults:
# needs: build
# name: E2E Vaults Suite
# uses: standardnotes/server/.github/workflows/common-e2e.yml@main
# with:
# snjs_image_tag: 'latest'
# suite: 'vaults'
# secrets: inherit

View File

@@ -95,20 +95,32 @@ jobs:
- name: Test
run: yarn test
e2e:
e2e-base:
needs: build
name: E2E
name: E2E Base Suite
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
with:
snjs_image_tag: 'latest'
suite: 'base'
secrets: inherit
# e2e-vaults:
# needs: build
# name: E2E Vaults Suite
# uses: standardnotes/server/.github/workflows/common-e2e.yml@main
# with:
# snjs_image_tag: 'latest'
# suite: 'vaults'
# secrets: inherit
publish-self-hosting:
needs: [ test, lint, e2e ]
needs: [ test, lint, e2e-base ]
name: Publish Self Hosting Docker Image
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
secrets: inherit
publish-services:
needs: [ test, lint, e2e ]
needs: [ test, lint, e2e-base ]
runs-on: ubuntu-latest

1111
.pnp.cjs generated

File diff suppressed because it is too large Load Diff

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More