2727 snjs :
2828 image : standardnotes/snjs:${{ inputs.snjs_image_tag }}
2929 ports :
30- - 9001:9001
30+ - 9001:9001
3131 cache :
3232 image : redis
3333 ports :
@@ -43,64 +43,66 @@ jobs:
4343 MYSQL_PASSWORD : standardnotes
4444
4545 steps :
46- - uses : actions/checkout@v4
46+ - uses : actions/checkout@v4
4747
48- - name : Set up Node
49- uses : actions/setup-node@v4
50- with :
51- registry-url : ' https://registry.npmjs.org'
52- node-version-file : ' .nvmrc'
48+ - name : Set up Node
49+ uses : actions/setup-node@v4
50+ with :
51+ registry-url : ' https://registry.npmjs.org'
52+ node-version-file : ' .nvmrc'
5353
54- - name : Install Dependencies
55- run : yarn install --immutable
54+ - name : Install Dependencies
55+ run : yarn install --immutable
5656
57- - name : Build
58- run : yarn build
57+ - name : Build
58+ run : yarn build
5959
60- - name : Copy dotenv file
61- run : cp packages/home-server/.env.sample packages/home-server/.env
60+ - name : Copy dotenv file
61+ run : cp packages/home-server/.env.sample packages/home-server/.env
6262
63- - name : Fill in env variables
64- run : |
65- sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
66- sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
67- sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
68- sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
69- sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
70- echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
71- echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
72- echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
73- echo "CONTENT_SIZE_TRANSFER_LIMIT=100000" >> packages/home-server/.env
74- echo "HTTP_REQUEST_PAYLOAD_LIMIT_MEGABYTES=1" >> packages/home-server/.env
75- echo "DB_HOST=localhost" >> packages/home-server/.env
76- echo "DB_PORT=3306" >> packages/home-server/.env
77- echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
78- echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
79- echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
80- echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
81- echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
82- echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
83- echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
84- echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
85- echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
86- echo "E2E_TESTING=true" >> packages/home-server/.env
63+ - name : Fill in env variables
64+ run : |
65+ sed -i "s/JWT_SECRET=/JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
66+ sed -i "s/AUTH_JWT_SECRET=/AUTH_JWT_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
67+ sed -i "s/ENCRYPTION_SERVER_KEY=/ENCRYPTION_SERVER_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
68+ sed -i "s/PSEUDO_KEY_PARAMS_KEY=/PSEUDO_KEY_PARAMS_KEY=$(openssl rand -hex 32)/g" packages/home-server/.env
69+ sed -i "s/VALET_TOKEN_SECRET=/VALET_TOKEN_SECRET=$(openssl rand -hex 32)/g" packages/home-server/.env
70+ echo "ACCESS_TOKEN_AGE=4" >> packages/home-server/.env
71+ echo "REFRESH_TOKEN_AGE=10" >> packages/home-server/.env
72+ echo "REVISIONS_FREQUENCY=2" >> packages/home-server/.env
73+ echo "CONTENT_SIZE_TRANSFER_LIMIT=100000" >> packages/home-server/.env
74+ echo "HTTP_REQUEST_PAYLOAD_LIMIT_MEGABYTES=1" >> packages/home-server/.env
75+ echo "DB_HOST=localhost" >> packages/home-server/.env
76+ echo "DB_PORT=3306" >> packages/home-server/.env
77+ echo "DB_DATABASE=standardnotes" >> packages/home-server/.env
78+ echo "DB_SQLITE_DATABASE_PATH=homeserver.db" >> packages/home-server/.env
79+ echo "DB_USERNAME=standardnotes" >> packages/home-server/.env
80+ echo "DB_PASSWORD=standardnotes" >> packages/home-server/.env
81+ echo "DB_TYPE=${{ matrix.db_type }}" >> packages/home-server/.env
82+ echo "DB_DEBUG_LEVEL=all" >> packages/home-server/.env
83+ echo "REDIS_URL=redis://localhost:6379" >> packages/home-server/.env
84+ echo "CACHE_TYPE=${{ matrix.cache_type }}" >> packages/home-server/.env
85+ echo "FILES_SERVER_URL=http://localhost:3123" >> packages/home-server/.env
86+ echo "E2E_TESTING=true" >> packages/home-server/.env
87+ echo "APPLICATION_VERSION_THRESHOLD_FOR_TOKEN_VERSION_2=0.0.0" >> packages/home-server/.env
88+ echo "APPLICATION_VERSION_THRESHOLD_FOR_TOKEN_VERSION_3=0.0.0" >> packages/home-server/.env
8789
88- - name : Run Server
89- run : nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
90- env :
91- PORT : 3123
90+ - name : Run Server
91+ run : nohup yarn workspace @standardnotes/home-server start > logs/output.log 2>&1 &
92+ env :
93+ PORT : 3123
9294
93- - name : Wait for server to start
94- run : for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
95+ - name : Wait for server to start
96+ run : for i in {1..30}; do curl -s http://localhost:3123/healthcheck && break || sleep 1; done
9597
96- - name : Run E2E Test Suite
97- run : yarn dlx mocha-headless-chrome --timeout 3600000 -a no-sandbox -a disable-setuid-sandbox -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
98+ - name : Run E2E Test Suite
99+ run : yarn dlx mocha-headless-chrome --timeout 3600000 -a no-sandbox -a disable-setuid-sandbox -f http://localhost:9001/mocha/test.html?suite=${{ inputs.suite }}
98100
99- - name : Archive failed run logs
100- if : ${{ failure() }}
101- uses : actions/upload-artifact@v4
102- with :
103- name : home-server-failure-logs-${{ inputs.suite }}-${{ matrix.db_type }}-${{ matrix.cache_type }}
104- retention-days : 5
105- path : |
106- logs/output.log
101+ - name : Archive failed run logs
102+ if : ${{ failure() }}
103+ uses : actions/upload-artifact@v4
104+ with :
105+ name : home-server-failure-logs-${{ inputs.suite }}-${{ matrix.db_type }}-${{ matrix.cache_type }}
106+ retention-days : 5
107+ path : |
108+ logs/output.log
0 commit comments