Skip to content

Commit

Permalink
(core) updates from grist-core
Browse files Browse the repository at this point in the history
  • Loading branch information
paulfitz committed Dec 17, 2024
2 parents a792bdc + 4bce42d commit 81e052e
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 6 deletions.
62 changes: 60 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- ':lint:python:client:common:smoke:stubs:'
- ':server-1-of-2:'
- ':server-2-of-2:'
- ':gen-server:'
- ':nbrowser-^[A-D]:'
- ':nbrowser-^[E-L]:'
- ':nbrowser-^[M-N]:'
Expand Down Expand Up @@ -63,7 +64,7 @@ jobs:
run: yarn run lint:ci

- name: Make sure bucket is versioned
if: contains(matrix.tests, ':server-')
if: contains(matrix.tests, ':server-') || contains(matrix.tests, ':gen-server:')
env:
AWS_ACCESS_KEY_ID: administrator
AWS_SECRET_ACCESS_KEY: administrator
Expand Down Expand Up @@ -96,12 +97,51 @@ jobs:
if: contains(matrix.tests, ':stubs:')
run: MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:stubs

- name: Run gen-server tests with sqlite, minio and redis
if: contains(matrix.tests, ':gen-server:')
run: |
yarn run test:gen-server
# Anchors should be used once available. Not supported yet as of December 2024.
# https://github.com/actions/runner/issues/1182
env:
MOCHA_WEBDRIVER_HEADLESS: 1
TESTS: ${{ matrix.tests }}
GRIST_DOCS_MINIO_ACCESS_KEY: administrator
GRIST_DOCS_MINIO_SECRET_KEY: administrator
TEST_REDIS_URL: "redis://localhost/11"
GRIST_DOCS_MINIO_USE_SSL: 0
GRIST_DOCS_MINIO_ENDPOINT: localhost
GRIST_DOCS_MINIO_PORT: 9000
GRIST_DOCS_MINIO_BUCKET: grist-docs-test

- name: Run gen-server tests with postgres, minio and redis
if: contains(matrix.tests, ':gen-server:')
run: |
PGPASSWORD=$TYPEORM_PASSWORD psql -h $TYPEORM_HOST -U $TYPEORM_USERNAME -w $TYPEORM_DATABASE -c "SHOW ALL;" | grep ' jit '
yarn run test:gen-server
env:
MOCHA_WEBDRIVER_HEADLESS: 1
TESTS: ${{ matrix.tests }}
GRIST_DOCS_MINIO_ACCESS_KEY: administrator
GRIST_DOCS_MINIO_SECRET_KEY: administrator
TEST_REDIS_URL: "redis://localhost/11"
GRIST_DOCS_MINIO_USE_SSL: 0
GRIST_DOCS_MINIO_ENDPOINT: localhost
GRIST_DOCS_MINIO_PORT: 9000
GRIST_DOCS_MINIO_BUCKET: grist-docs-test
TYPEORM_TYPE: postgres
TYPEORM_HOST: localhost
TYPEORM_DATABASE: db_name
TYPEORM_USERNAME: db_user
TYPEORM_PASSWORD: db_password

- name: Run server tests with minio and redis
if: contains(matrix.tests, ':server-')
run: |
export TEST_SPLITS=$(echo $TESTS | sed "s/.*:server-\([^:]*\).*/\1/")
MOCHA_WEBDRIVER_HEADLESS=1 yarn run test:server
yarn run test:server
env:
MOCHA_WEBDRIVER_HEADLESS: 1
TESTS: ${{ matrix.tests }}
GRIST_DOCS_MINIO_ACCESS_KEY: administrator
GRIST_DOCS_MINIO_SECRET_KEY: administrator
Expand Down Expand Up @@ -167,6 +207,24 @@ jobs:
--health-timeout 5s
--health-retries 5
postgresql:
image: postgres:latest
env:
POSTGRES_USER: db_user
POSTGRES_PASSWORD: db_password
POSTGRES_DB: db_name
# JIT is enabled by default since Postgres 17 and has a huge negative impact on performance,
# making many tests timeout.
# https://support.getgrist.com/self-managed/#what-is-a-home-database
POSTGRES_INITDB_ARGS: "-c jit=off"
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U db_user"
--health-interval 10s
--health-timeout 5s
--health-retries 5
candidate:
needs: build_and_test
if: ${{ success() && github.event_name == 'push' }}
Expand Down
5 changes: 5 additions & 0 deletions app/client/components/LayoutTray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,11 @@ const cssCollapsedTray = styled('div.collapsed_layout', `
outline: 2px dashed #7B8CEA;
background: rgba(123, 140, 234, 0.1);
}
@media print {
& {
display: none;
}
}
`
);

Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"test:stubs": "GRIST_TEST_LOGIN=1 ./test/test_env.sh mocha ${DEBUG:+-b --no-exit} $([ -z $DEBUG ] && echo --forbid-only) -g \"${GREP_TESTS}\" --slow 8000 -R test/xunit-file '_build/test/nbrowser_with_stubs/**/*.js'",
"test:client": "./test/test_env.sh mocha ${DEBUG:+'-b'} '_build/test/client/**/*.js'",
"test:common": "./test/test_env.sh mocha ${DEBUG:+'-b'} '_build/test/common/**/*.js'",
"test:server": "TEST_SUITE=server TEST_SUITE_FOR_TIMINGS=server TIMINGS_FILE=test/timings/server.txt ./test/test_env.sh mocha ${DEBUG:+'-b'} -g \"${GREP_TESTS}\" -R test/xunit-file '_build/test/server/**/*.js' '_build/test/gen-server/**/*.js'",
"test:server": "TEST_SUITE=server TEST_SUITE_FOR_TIMINGS=server TIMINGS_FILE=test/timings/server.txt ./test/test_env.sh mocha ${DEBUG:+'-b'} -g \"${GREP_TESTS}\" -R test/xunit-file '_build/test/server/**/*.js'",
"test:gen-server": "TEST_SUITE=gen-server TEST_SUITE_FOR_TIMINGS=gen-server TIMINGS_FILE=test/timings/gen-server.txt ./test/test_env.sh mocha ${DEBUG:+'-b'} -g \"${GREP_TESTS}\" -R test/xunit-file '_build/test/gen-server/**/*.js'",
"test:smoke": "./test/test_env.sh mocha _build/test/nbrowser/Smoke.js",
"test:docker": "./test/test_under_docker.sh",
"test:python": "sandbox_venv3/bin/python sandbox/grist/runtests.py ${GREP_TESTS:+discover -p \"test*${GREP_TESTS}*.py\"}",
Expand Down
38 changes: 35 additions & 3 deletions static/locales/eu.client.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,15 @@
"Notify other services on doc changes": "Jakinarazi beste zerbitzu batzuei dokumentuak aldatzerakoan",
"python2 (legacy)": "python2 (legatua)",
"python3 (recommended)": "python3 (gomendatua)",
"Time reload": "Kronometratu birkarga"
"Time reload": "Kronometratu birkarga",
"Normal document behavior. All users work on the same copy of the document.": "Dokumentu arruntaren jokaera. Erabiltzaile guztiek egiten dute lan dokumentuaren kopia berberean.",
"Template": "Txantiloia",
"Change document type": "Aldatu dokumentu mota",
"Change nature of document": "Aldatu dokumentuaren natura",
"Regular document": "Dokumentu arrunta",
"Regular": "Arrunta",
"Confirm change": "Baieztatu aldaketa",
"Edit": "Editatu"
},
"DocumentUsage": {
"Attachments Size": "Eranskinen tamaina",
Expand Down Expand Up @@ -880,7 +888,11 @@
"DateTime": "Data eta Ordua",
"Reference": "Erreferentzia",
"Reference List": "Erreferentzia-zerrenda",
"Search columns": "Bilaketa-zutabeak"
"Search columns": "Bilaketa-zutabeak",
"Custom": "Norberak ezarritakoa",
"By Name": "Izenaren arabera",
"By Date Modified": "Moldatutako dataren arabera",
"Light": "Argia"
},
"modals": {
"Cancel": "Utzi",
Expand Down Expand Up @@ -1563,7 +1575,9 @@
"Session Secret": "Saioaren gakoa",
"Enable Grist Enterprise": "Gaitu Grist Enterprise",
"Enterprise": "Enterprise",
"checking": "egiaztatzen"
"checking": "egiaztatzen",
"Contact us": "Jarri harremanetan",
"Off": "Itzalita"
},
"Columns": {
"Remove Column": "Kendu zutabea"
Expand Down Expand Up @@ -1789,5 +1803,23 @@
},
"The toggle is **off**": "Ezaugarria **desaktibatuta** dago",
"The toggle is **on**": "Ezaugarria **aktibatuta** dago"
},
"AuditLogStreamingConfig": {
"Cancel": "Utzi",
"Edit": "Editatu",
"Delete": "Ezabatu",
"Add destination": "Gehitu helburua",
"Destination": "Helburua",
"Destinations": "Helburuak",
"Enter URL": "Sartu URLa",
"Enter token": "Sartu tokena",
"Learn more": "Ikasi gehiago",
"Save": "Gorde",
"Splunk": "Splunk",
"Token": "Tokena",
"URL": "URLa"
},
"AuditLogsPage": {
"Contact us": "Jarri harremanetan"
}
}
12 changes: 12 additions & 0 deletions static/locales/tr.client.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,17 @@
"Add Column Rule": "Sütuna Kural ekle",
"Add Default Rule": "Kural ekle (genel)",
"Add Table Rules": "Tabloya kural ekle"
},
"AdminPanel": {
"Off": "Kapalı",
"Log Streaming": "Günlük Akışları",
"Audit Logs": "Denetim Günlükleri",
"Contact us": "Bize Ulaşın"
},
"Columns": {
"Remove Column": "Sütunu Sil"
},
"Field": {
"No choices configured": "Seçim yapılmamış"
}
}

0 comments on commit 81e052e

Please sign in to comment.