Skip to content

Commit

Permalink
CI check translations now runs using the production build (#6627)
Browse files Browse the repository at this point in the history
* CI check translations now runs using the production build

* Add health check to mongo service

* updated translations db script to work in prod

* version bump

---------

Co-authored-by: A happy cat <[email protected]>
  • Loading branch information
daneryl and konzz authored Mar 25, 2024
1 parent 6dab5c5 commit 2088ee7
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
16 changes: 11 additions & 5 deletions .github/workflows/ci_check_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,12 @@ jobs:
ports:
- 9200/tcp
options: -e="discovery.type=single-node" --health-cmd="curl http://localhost:9200/_cluster/health" --health-interval=10s --health-timeout=5s --health-retries=10
mongodb:
image: mongo:4.2.6
ports:
- 27017/tcp
steps:
- name: Start MongoDB
uses: supercharge/[email protected]
with:
mongodb-version: 4.2.6
mongodb-replica-set: test-rs
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
Expand All @@ -39,11 +40,16 @@ jobs:
- name: install dependencies
run: yarn install
- run: yarn blank-state
env:
DBHOST: localhost:27017
ELASTICSEARCH_URL: http://localhost:${{ job.services.elasticsearch.ports[9200] }}
- run: yarn production-build
env:
DBHOST: localhost:${{ job.services.mongodb.ports[27017] }}
ELASTICSEARCH_URL: http://localhost:${{ job.services.elasticsearch.ports[9200] }}
- run: yarn update-translations-db
- run: cd prod; yarn update-translations-db
env:
NODE_ENV: production
DBHOST: localhost:${{ job.services.mongodb.ports[27017] }}
- run: yarn check-translations
env:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uwazi",
"version": "1.159.0",
"version": "1.159.1",
"description": "Uwazi is a free, open-source solution for organising, analysing and publishing your documents.",
"keywords": [
"react"
Expand Down
4 changes: 2 additions & 2 deletions scripts/updateTranslationsDB.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import csvtojson from 'csvtojson';
import fs from 'fs';
import { exit } from 'process';
import { DB } from '../app/api/odm/DB.ts';
import { config } from '../app/api/config.ts';
import { DB } from '../app/api/odm/DB';
import { config } from '../app/api/config';

const TRANSLATIONS_DIR = `${__dirname}/../contents/ui-translations`;
const logger = new console.Console(process.stdout, process.stderr);
Expand Down

0 comments on commit 2088ee7

Please sign in to comment.