mirror of
https://github.com/standardnotes/server
synced 2026-04-18 23:05:49 -04:00
Compare commits
390 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 787eedc8af | |||
| 040a2b5e5f | |||
| 347ee275fa | |||
| 1c0a9e6726 | |||
| c4f038ab9a | |||
| 3746ac5fc1 | |||
| 5c4353dd0c | |||
| f64caed220 | |||
| 863d590292 | |||
| 0dcf64c82b | |||
| 48fd5c5ff6 | |||
| 84fa374072 | |||
| 2313b0b450 | |||
| 4fa6f579af | |||
| 08c1328932 | |||
| 4586308210 | |||
| 5aa561dcb2 | |||
| e07612fe24 | |||
| c9289204c4 | |||
| 51bb1081a6 | |||
| 25066bb33c | |||
| bfdb176445 | |||
| 42233fa756 | |||
| 55de4319ed | |||
| 306f6edd4e | |||
| bf55bbccd9 | |||
| 6e26c0a0be | |||
| 11bcd318ab | |||
| 2f6d19dc91 | |||
| 989e1ce175 | |||
| 1c2fd46401 | |||
| b7967b34d1 | |||
| 44dfa37852 | |||
| a06e3c7e74 | |||
| b54c331bef | |||
| 8216fe5e36 | |||
| b5c9c4b188 | |||
| 86bd617933 | |||
| eb771e7932 | |||
| 5ea91aeafc | |||
| 3c67290aeb | |||
| f9f6c2f9be | |||
| a92e8f61bc | |||
| e739683bb6 | |||
| f4a743593d | |||
| f93e49ecf3 | |||
| d6325a42ea | |||
| ef997be219 | |||
| b6eadfcebc | |||
| e4c65ca631 | |||
| 2d2342f9ee | |||
| 60838a1b7e | |||
| 63401b7640 | |||
| 6a5b669ec4 | |||
| ca201447d2 | |||
| f1d3117518 | |||
| 8559948a5a | |||
| a3b4aa3b4a | |||
| 0347fa381f | |||
| 3d475cc779 | |||
| ceec74fb70 | |||
| f5296a947e | |||
| 5b5fcd9372 | |||
| c38817c62e | |||
| ba08c6a707 | |||
| 1797bc8181 | |||
| 657aaf75ec | |||
| dac3c733b3 | |||
| d02b6b67b5 | |||
| 52ce5f3a2f | |||
| 1d316e17cb | |||
| 6193f4b87a | |||
| de5a30e46c | |||
| 973acd22ca | |||
| e235293070 | |||
| 07ab67faa8 | |||
| e6fce8cbc7 | |||
| 589f8e62f4 | |||
| 27f45f7cf6 | |||
| 48af4ac79c | |||
| 9b6baab1e0 | |||
| 3ba4e712dc | |||
| 5bf3ecdf42 | |||
| bd6fd472a6 | |||
| 7f4776b52b | |||
| d20f03127a | |||
| 4b6c7774e0 | |||
| d02bca8879 | |||
| 5e654ccf94 | |||
| 7d3e5c22fb | |||
| 23eb61ee5f | |||
| 2cded4b2d1 | |||
| ba7662fc1e | |||
| 832a48ac76 | |||
| 2db0c125fe | |||
| 20d9624bc6 | |||
| f20ee68f50 | |||
| cbf45ce3eb | |||
| 2e7fdd93dd | |||
| 8ce38f82b5 | |||
| ec5429eeec | |||
| 4b17c4045d | |||
| aaf42e4693 | |||
| 0e3cbfc40b | |||
| a95ca05c10 | |||
| 56b600dbdc | |||
| 80a013d0a3 | |||
| 7ef59bb74c | |||
| 9cf1a9e25c | |||
| 0fce6c0cd4 | |||
| 2d444e9aa0 | |||
| 7c393b1125 | |||
| 78ab4dc94d | |||
| 6a5904cfaa | |||
| a6061ec2a9 | |||
| 51c777304b | |||
| fbd535f2c5 | |||
| 7d456671c2 | |||
| dd4924c925 | |||
| f73129cd7e | |||
| 4983c8741e | |||
| c5798640ff | |||
| 5803a8018a | |||
| e2aae8ac8a | |||
| 2917aeeb32 | |||
| 9377c03c3f | |||
| 9b926fbad6 | |||
| 8db19c3e2b | |||
| ca970781c7 | |||
| e7beee2788 | |||
| d266eada88 | |||
| 11b8b078b4 | |||
| 37912fa29a | |||
| b97dafe6f3 | |||
| 2a29151395 | |||
| 8b988d89c0 | |||
| c0908f1b58 | |||
| bb46044f7c | |||
| 60b3dd6138 | |||
| 22c1f936c3 | |||
| e899874b04 | |||
| 04c6888cf6 | |||
| 29c56c6919 | |||
| c98ed9cc85 | |||
| 88f7530c13 | |||
| bb820437af | |||
| d1a4bd38e0 | |||
| d18f6ccd32 | |||
| aa317c964e | |||
| 7ae8845ae9 | |||
| 123a6dbe0c | |||
| dda8d79526 | |||
| de5293955a | |||
| 96669bff5b | |||
| a99762f004 | |||
| 1fc3c9b83e | |||
| af86b6f664 | |||
| a0208dd5b3 | |||
| 1c5c8b81d5 | |||
| 79c3e33434 | |||
| 5ab8729a31 | |||
| db0baf92f1 | |||
| a8974094db | |||
| 13c5c97ba7 | |||
| 894ebb3edd | |||
| cac899a7e5 | |||
| 901e0dd93b | |||
| a360231fd0 | |||
| 6ccc6ee42f | |||
| 9c72ad85a0 | |||
| fa6d80a753 | |||
| f6ab2ca9ba | |||
| ba1e1ad5ad | |||
| 02705ea3ad | |||
| df6e3f06a6 | |||
| 1cb5ee9fd6 | |||
| 893d6176c3 | |||
| 2c1b512e40 | |||
| de50d76800 | |||
| 401b78e477 | |||
| 01837eaea9 | |||
| 7df699353c | |||
| 5455972be2 | |||
| 57488bcd16 | |||
| b6fda901ef | |||
| 14669df890 | |||
| 64525a65f2 | |||
| 61fc7efecb | |||
| 8c7c1e4745 | |||
| f64d30ec88 | |||
| 384dfc8da4 | |||
| 841784ae8c | |||
| f5683cfd94 | |||
| 0a420ce30e | |||
| a5e7132d3c | |||
| 6dfb2be4a2 | |||
| d81cbad550 | |||
| 51ad06b303 | |||
| 27048ad95c | |||
| fa9bf0b448 | |||
| 305190b64e | |||
| 98e3d18335 | |||
| 72e398956b | |||
| 1e69a13a97 | |||
| 7f9e6e2f44 | |||
| d3c6c0d48e | |||
| 6c83476fd2 | |||
| 9cdf7e2c51 | |||
| 599119e14e | |||
| a2c484e0f3 | |||
| 97ff4d5ac2 | |||
| 5255cfbb25 | |||
| 780358368b | |||
| cf0b918913 | |||
| 4ea690204e | |||
| 14eb775749 | |||
| bf4a3be6d9 | |||
| b9e1e47871 | |||
| ff532ecb22 | |||
| eb21872db1 | |||
| 8e3df184dc | |||
| b34bbcac8b | |||
| 226965a1d7 | |||
| 17b2ea126c | |||
| 59fc4a089c | |||
| ef26dc8cbb | |||
| 8a0fbb28b0 | |||
| 618d8d5b1a | |||
| 3a936dc9c1 | |||
| 031fcd75ee | |||
| c8cd23cb32 | |||
| a3049938a3 | |||
| b23488e862 | |||
| c8203cf04c | |||
| 4f2616ef0a | |||
| 04ffc69e00 | |||
| 5b4bb6e7a7 | |||
| 2e953ba998 | |||
| ed5a4eb960 | |||
| 31b2c05084 | |||
| 6e1662038c | |||
| df78d88f79 | |||
| addedb3091 | |||
| 2ea17b2dea | |||
| 85d2f42f47 | |||
| cdb655c1bd | |||
| 3064d03aa9 | |||
| 6af6417ca2 | |||
| a35271fbb3 | |||
| 63aef71f60 | |||
| 0f8457534c | |||
| 2984582e62 | |||
| 147d8fd9af | |||
| c12d354900 | |||
| 8bcb552783 | |||
| f504a8288c | |||
| 79f5b54228 | |||
| 669a9855e6 | |||
| e3b96c3a1f | |||
| 7e0d4bef20 | |||
| 0bd0f48df3 | |||
| ae56126585 | |||
| 6dcf0ac124 | |||
| 63e2ce43c2 | |||
| f27aa21eb5 | |||
| 42926c663b | |||
| d38116183c | |||
| 9ca373e208 | |||
| 4084f2f5ec | |||
| 684ffbadbc | |||
| 1c4d4c57de | |||
| d83111a199 | |||
| f10fa839fb | |||
| 1f20395ff3 | |||
| bfe6f4255a | |||
| b9032f3012 | |||
| ce53c459e6 | |||
| 6df42fb0d5 | |||
| 1e2b496f4f | |||
| 528c1b0d57 | |||
| 22fba8ba80 | |||
| 6f26261ebe | |||
| 4b1fe3ba91 | |||
| 9f95262bd4 | |||
| 2ec28e541e | |||
| 4764d4b19a | |||
| 9b27547dae | |||
| a96f2c9153 | |||
| 225e0aaf88 | |||
| f0c85910bc | |||
| 124c443528 | |||
| 37c7f8d39f | |||
| c419f1ce22 | |||
| 4949cdfe2f | |||
| cd101b96ea | |||
| 40d0e4631f | |||
| a55a995660 | |||
| 1d576d48ad | |||
| 4ff8030f87 | |||
| c15e2e2c8f | |||
| 41d31a8d75 | |||
| 10e2a26352 | |||
| 6e547f77d0 | |||
| 530a426601 | |||
| 642d6bab77 | |||
| 7980af3d82 | |||
| 2980c42e88 | |||
| b03994f9db | |||
| 41906ec2f9 | |||
| 4d1e7ff2a5 | |||
| 7f18fcfc13 | |||
| ff02ce0747 | |||
| a6056600eb | |||
| 24c94326d5 | |||
| 48c0cb5e62 | |||
| 9968efe1b2 | |||
| 6368342149 | |||
| b5f73db210 | |||
| 22d6a02d04 | |||
| 4e0bcfcccf | |||
| 104313c15d | |||
| 814289af46 | |||
| 3096cd98d5 | |||
| 45dfefbc7a | |||
| 20d92149a8 | |||
| 9c01fffca5 | |||
| 61c1cfff4b | |||
| 7e74261f62 | |||
| 32601f34f1 | |||
| aef69a1a96 | |||
| 130f90bdb6 | |||
| 851c7de87f | |||
| 118156c62d | |||
| cdad3143c9 | |||
| 00fe32136e | |||
| 52f56eeb68 | |||
| b595264e31 | |||
| bf04262170 | |||
| fd589922bb | |||
| fb7029f5c1 | |||
| cc4b4f9bf8 | |||
| b048d6d7e3 | |||
| cffc1f442f | |||
| 91fe710741 | |||
| 5a1eb9fdac | |||
| a64ef6e750 | |||
| 47d2012b3d | |||
| 2c99cd2e21 | |||
| 435cd2f66a | |||
| 372b12dfc2 | |||
| 3a12f5c1c4 | |||
| 781de224b6 | |||
| eff09454c3 | |||
| 473feba6a8 | |||
| e9f0704fb0 | |||
| 8c99469d88 | |||
| 8ec1311dfc | |||
| e48cca6b45 | |||
| d660721f95 | |||
| c52bb93d79 | |||
| ffb6bfd0c9 | |||
| 6e0855f9b3 | |||
| ec9e9ec387 | |||
| fa75aa40f0 | |||
| b865953c22 | |||
| 2542cf6f9a | |||
| cb9499b87f | |||
| c351f01f67 | |||
| c87561fca7 | |||
| a363c143fa | |||
| fb81d2b926 | |||
| 05b1b8f079 | |||
| 7848dc06d4 | |||
| 3a005719b7 | |||
| 6928988f78 | |||
| a521894d7c | |||
| b7fb1d9c08 | |||
| 5f67e45911 | |||
| fddf9fccbd | |||
| 2bedbd7bd2 | |||
| 02f3c85796 | |||
| 3b5bd6a47f | |||
| 06fd404d44 | |||
| d931c52508 | |||
| 800fe9e4c8 | |||
| 8b3d78678f | |||
| 2351cd3ad6 | |||
| dd86c5bcdf | |||
| d0c00e306e | |||
| 6cd68ddd6a |
@@ -0,0 +1,13 @@
|
||||
dist
|
||||
coverage
|
||||
|
||||
.yarn/*
|
||||
!.yarn/cache
|
||||
!.yarn/patches
|
||||
!.yarn/plugins
|
||||
!.yarn/releases
|
||||
!.yarn/unplugged
|
||||
!.yarn/sdks
|
||||
!.yarn/versions
|
||||
|
||||
data/*
|
||||
+23
@@ -1,6 +1,29 @@
|
||||
###########
|
||||
# General #
|
||||
###########
|
||||
EXPOSED_PORT=3000
|
||||
|
||||
#########
|
||||
# FILES #
|
||||
#########
|
||||
EXPOSED_FILES_SERVER_PORT=3042
|
||||
PUBLIC_FILES_SERVER_URL=http://localhost:3042
|
||||
|
||||
######
|
||||
# DB #
|
||||
######
|
||||
|
||||
DB_HOST=db
|
||||
DB_PORT=3306
|
||||
DB_USERNAME=std_notes_user
|
||||
DB_PASSWORD=changeme123
|
||||
DB_DATABASE=standard_notes_db
|
||||
DB_DEBUG_LEVEL=all
|
||||
DB_MIGRATIONS_PATH=dist/migrations/*.js
|
||||
|
||||
#########
|
||||
# CACHE #
|
||||
#########
|
||||
|
||||
REDIS_PORT=6379
|
||||
REDIS_HOST=cache
|
||||
|
||||
@@ -55,6 +55,11 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/revisions"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/scheduler"
|
||||
schedule:
|
||||
@@ -85,6 +90,11 @@ updates:
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/websockets"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
|
||||
- package-ecosystem: "npm"
|
||||
directory: "/packages/workspace"
|
||||
schedule:
|
||||
|
||||
@@ -11,19 +11,18 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Server Application
|
||||
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||
call_server_utility_workflow:
|
||||
name: Server Utility
|
||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
||||
with:
|
||||
service_name: analytics
|
||||
workspace_name: "@standardnotes/analytics"
|
||||
e2e_tag_parameter_name: analytics_image_tag
|
||||
deploy_web: false
|
||||
package_path: packages/analytics
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
needs: call_server_utility_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
@@ -0,0 +1,101 @@
|
||||
name: Reusable Run E2E Test Suite Workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: true
|
||||
DOCKER_PASSWORD:
|
||||
required: true
|
||||
AWS_ACCESS_KEY_ID:
|
||||
required: true
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
services:
|
||||
snjs:
|
||||
image: standardnotes/snjs
|
||||
ports:
|
||||
- 9001:9001
|
||||
db:
|
||||
image: mysql:8
|
||||
env:
|
||||
MYSQL_DATABASE: standard_notes_db
|
||||
MYSQL_USER: std_notes_user
|
||||
MYSQL_PASSWORD: changeme123
|
||||
MYSQL_ROOT_PASSWORD: changeme123
|
||||
ports:
|
||||
- 3306:3306
|
||||
cache:
|
||||
image: redis:6.0-alpine
|
||||
ports:
|
||||
- 6379:6379
|
||||
mock-event-publisher:
|
||||
image: standardnotes/mock-event-publisher
|
||||
ports:
|
||||
- 3124:3000
|
||||
env:
|
||||
LOG_LEVEL: debug
|
||||
NODE_ENV: production
|
||||
VERSION: snjs-test
|
||||
SNS_TOPIC_ARN: arn:aws:sns:us-east-1:000000000000:payments-local-topic
|
||||
SNS_ENDPOINT: http://localstack:4566
|
||||
SNS_DISABLE_SSL: true
|
||||
SNS_SECRET_ACCESS_KEY: x
|
||||
SNS_ACCESS_KEY_ID: x
|
||||
SNS_AWS_REGION: us-east-1
|
||||
NEW_RELIC_ENABLED: false
|
||||
options: >-
|
||||
--name "mock-event-publisher"
|
||||
|
||||
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: Build Docker image for E2E testing
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: standardnotes/server:${{ github.sha }}
|
||||
|
||||
- name: Run Server
|
||||
run: docker run -d standardnotes/server:${{ github.sha }}
|
||||
env:
|
||||
EXPOSED_PORT: 3123
|
||||
EXPOSED_FILES_SERVER_PORT: 3125
|
||||
PUBLIC_FILES_SERVER_URL: http://localhost:3125
|
||||
DB_HOST: localhost
|
||||
DB_PORT: 3306
|
||||
DB_USERNAME: std_notes_user
|
||||
DB_PASSWORD: changeme123
|
||||
DB_DATABASE: standard_notes_db
|
||||
REDIS_PORT: 6379
|
||||
REDIS_HOST: localhost
|
||||
AUTH_SERVER_ACCESS_TOKEN_AGE: 4
|
||||
AUTH_SERVER_REFRESH_TOKEN_AGE: 10
|
||||
AUTH_SERVER_EPHEMERAL_SESSION_AGE: 300
|
||||
SYNCING_SERVER_REVISIONS_FREQUENCY: 5
|
||||
AUTH_SERVER_LOG_LEVEL: debug
|
||||
SYNCING_SERVER_LOG_LEVEL: debug
|
||||
FILES_SERVER_LOG_LEVEL: debug
|
||||
REVISIONS_SERVER_LOG_LEVEL: debug
|
||||
API_GATEWAY_LOG_LEVEL: debug
|
||||
|
||||
- name: Wait for server to start
|
||||
run: docker/wait-for.sh localhost 3123
|
||||
|
||||
- name: Run E2E Test Suite
|
||||
run: yarn dlx mocha-headless-chrome --timeout 1200000 -f http://localhost:9001/mocha/test.html
|
||||
@@ -0,0 +1,54 @@
|
||||
name: Reusable Publish Docker Self Hosting Image Workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: true
|
||||
DOCKER_PASSWORD:
|
||||
required: true
|
||||
AWS_ACCESS_KEY_ID:
|
||||
required: true
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
e2e:
|
||||
name: E2E
|
||||
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||
secrets: inherit
|
||||
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: e2e
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@master
|
||||
with:
|
||||
platforms: all
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@master
|
||||
|
||||
- name: Publish Docker image
|
||||
uses: docker/build-push-action@v3
|
||||
with:
|
||||
builder: ${{ steps.buildx.outputs.name }}
|
||||
context: .
|
||||
file: Dockerfile
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
standardnotes/server:latest
|
||||
standardnotes/server:${{ github.sha }}
|
||||
@@ -187,12 +187,12 @@ jobs:
|
||||
tags: standardnotes/${{ inputs.service_name }}:${{ github.sha }}
|
||||
|
||||
- name: Run E2E test suite
|
||||
uses: convictional/trigger-workflow-and-wait@v1.6.3
|
||||
uses: convictional/trigger-workflow-and-wait@master
|
||||
with:
|
||||
owner: standardnotes
|
||||
repo: e2e
|
||||
repo: self-hosted
|
||||
github_token: ${{ secrets.CI_PAT_TOKEN }}
|
||||
workflow_file_name: testing-with-stable-client.yml
|
||||
workflow_file_name: testing-with-updating-client-and-server.yml
|
||||
wait_interval: 30
|
||||
client_payload: '{"${{ inputs.e2e_tag_parameter_name }}": "${{ github.sha }}"}'
|
||||
propagate_failure: true
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
name: Reusable Server Utility Workflow
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
service_name:
|
||||
required: true
|
||||
type: string
|
||||
workspace_name:
|
||||
required: true
|
||||
type: string
|
||||
deploy_web:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
deploy_worker:
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
package_path:
|
||||
required: true
|
||||
type: string
|
||||
secrets:
|
||||
DOCKER_USERNAME:
|
||||
required: true
|
||||
DOCKER_PASSWORD:
|
||||
required: true
|
||||
CI_PAT_TOKEN:
|
||||
required: true
|
||||
AWS_ACCESS_KEY_ID:
|
||||
required: true
|
||||
AWS_SECRET_ACCESS_KEY:
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
outputs:
|
||||
temp_dir: ${{ steps.bundle-dir.outputs.temp_dir }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Create Bundle Dir
|
||||
id: bundle-dir
|
||||
run: echo "temp_dir=$(mktemp -d -t ${{ inputs.service_name }}-${{ github.sha }}-XXXXXXX)" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
${{ steps.bundle-dir.outputs.temp_dir }}
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Bundle
|
||||
run: yarn workspace ${{ inputs.workspace_name }} bundle --no-compress --output-directory ${{ steps.bundle-dir.outputs.temp_dir }}
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
${{ needs.build.outputs.temp_dir }}
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint:${{ inputs.service_name }}
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
${{ needs.build.outputs.temp_dir }}
|
||||
key: ${{ runner.os }}-${{ inputs.service_name }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build ${{ inputs.package_path }}
|
||||
|
||||
- name: Test
|
||||
run: yarn test ${{ inputs.package_path }}
|
||||
|
||||
publish:
|
||||
needs: [ build, test, lint ]
|
||||
|
||||
name: Publish Docker Image
|
||||
uses: standardnotes/server/.github/workflows/common-docker-image.yml@main
|
||||
with:
|
||||
service_name: ${{ inputs.service_name }}
|
||||
bundle_dir: ${{ needs.build.outputs.temp_dir }}
|
||||
package_path: ${{ inputs.package_path }}
|
||||
workspace_name: ${{ inputs.workspace_name }}
|
||||
secrets: inherit
|
||||
|
||||
deploy-web:
|
||||
if: ${{ inputs.deploy_web }}
|
||||
|
||||
needs: publish
|
||||
|
||||
name: Deploy Web
|
||||
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
|
||||
with:
|
||||
service_name: ${{ inputs.service_name }}
|
||||
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
|
||||
secrets: inherit
|
||||
|
||||
deploy-worker:
|
||||
if: ${{ inputs.deploy_worker }}
|
||||
|
||||
needs: publish
|
||||
|
||||
name: Deploy Worker
|
||||
uses: standardnotes/server/.github/workflows/common-deploy.yml@main
|
||||
with:
|
||||
service_name: ${{ inputs.service_name }}-worker
|
||||
docker_image: ${{ inputs.service_name }}:${{ github.sha }}
|
||||
secrets: inherit
|
||||
@@ -11,19 +11,18 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Server Application
|
||||
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||
call_server_utility_workflow:
|
||||
name: Server Utility
|
||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
||||
with:
|
||||
service_name: event-store
|
||||
workspace_name: "@standardnotes/event-store"
|
||||
e2e_tag_parameter_name: event_store_image_tag
|
||||
deploy_web: false
|
||||
package_path: packages/event-store
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
needs: call_server_utility_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
+86
-14
@@ -6,19 +6,91 @@ on:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
test:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
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: ESLint
|
||||
run: yarn lint
|
||||
- name: Build
|
||||
run: yarn build
|
||||
- name: Test
|
||||
run: yarn test
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
run: yarn build
|
||||
|
||||
lint:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
${{ needs.build.outputs.temp_dir }}
|
||||
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
|
||||
- name: Lint
|
||||
run: yarn lint
|
||||
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
needs: build
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache build
|
||||
id: cache-build
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
packages/**/dist
|
||||
${{ needs.build.outputs.temp_dir }}
|
||||
key: ${{ runner.os }}-build-${{ github.sha }}
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
node-version-file: '.nvmrc'
|
||||
|
||||
- name: Build
|
||||
if: steps.cache-build.outputs.cache-hit != 'true'
|
||||
run: yarn build
|
||||
|
||||
- name: Test
|
||||
run: yarn test
|
||||
|
||||
e2e:
|
||||
needs: build
|
||||
|
||||
name: E2E
|
||||
uses: standardnotes/server/.github/workflows/common-e2e.yml@main
|
||||
secrets: inherit
|
||||
|
||||
@@ -45,3 +45,10 @@ jobs:
|
||||
env:
|
||||
NODE_AUTH_TOKEN: ${{ secrets.CI_NPM_TOKEN }}
|
||||
|
||||
publish-self-hosting:
|
||||
needs: release_and_publish
|
||||
|
||||
name: Publish Self Hosting Docker Image
|
||||
uses: standardnotes/server/.github/workflows/common-self-hosting.yml@main
|
||||
secrets: inherit
|
||||
|
||||
|
||||
@@ -11,19 +11,18 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Server Application
|
||||
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||
call_server_utility_workflow:
|
||||
name: Server Utility
|
||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
||||
with:
|
||||
service_name: scheduler
|
||||
workspace_name: "@standardnotes/scheduler-server"
|
||||
e2e_tag_parameter_name: scheduler_image_tag
|
||||
deploy_web: false
|
||||
package_path: packages/scheduler
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
needs: call_server_utility_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
|
||||
@@ -11,18 +11,17 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Server Application
|
||||
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||
call_server_utility_workflow:
|
||||
name: Server Utility
|
||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
||||
with:
|
||||
service_name: websockets
|
||||
workspace_name: "@standardnotes/websockets-server"
|
||||
e2e_tag_parameter_name: websockets_image_tag
|
||||
package_path: packages/websockets
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
needs: call_server_utility_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -11,18 +11,17 @@ on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
call_server_application_workflow:
|
||||
name: Server Application
|
||||
uses: standardnotes/server/.github/workflows/common-server-application.yml@main
|
||||
call_server_utility_workflow:
|
||||
name: Server Utility
|
||||
uses: standardnotes/server/.github/workflows/common-server-utility.yml@main
|
||||
with:
|
||||
service_name: workspace
|
||||
workspace_name: "@standardnotes/workspace-server"
|
||||
e2e_tag_parameter_name: workspace_image_tag
|
||||
package_path: packages/workspace
|
||||
secrets: inherit
|
||||
|
||||
newrelic:
|
||||
needs: call_server_application_workflow
|
||||
needs: call_server_utility_workflow
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
@@ -20,3 +20,6 @@ packages/files/uploads/*
|
||||
|
||||
data/*
|
||||
!data/.gitkeep
|
||||
|
||||
logs/*
|
||||
!logs/.gitkeep
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"singleQuote": true,
|
||||
"trailingComma": "all",
|
||||
"printWidth": 120,
|
||||
"semi": false
|
||||
}
|
||||
Vendored
+2
-1
@@ -6,5 +6,6 @@
|
||||
"eslint.nodePath": ".yarn/sdks",
|
||||
"prettier.prettierPath": ".yarn/sdks/prettier/index.js",
|
||||
"typescript.tsdk": ".yarn/sdks/typescript/lib",
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true
|
||||
"typescript.enablePromptUseWorkspaceTsdk": true,
|
||||
"terraform.languageServer.enable": false
|
||||
}
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
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.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Vendored
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
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.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user