-
Notifications
You must be signed in to change notification settings - Fork 80
62 lines (59 loc) · 2.06 KB
/
ci_check_translations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: check translations
on:
push:
branches:
- development
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check_translations:
runs-on: ubuntu-20.04
services:
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.6-amd64
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
steps:
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: 5.0.27
mongodb-replica-set: test-rs
- uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Cache node modules
uses: actions/cache@v2
with:
path: ./node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: install dependencies
run: yarn install
- run: yarn blank-state
id: blank-state-attempt1
continue-on-error: true
env:
DBHOST: localhost:27017
ELASTICSEARCH_URL: http://localhost:${{ job.services.elasticsearch.ports[9200] }}
- run: yarn blank-state --force
id: blank-state-attempt2
if: steps.blank-state-attempt1.outcome == 'failure'
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: cd prod; yarn update-translations-db
env:
NODE_ENV: production
DBHOST: localhost:${{ job.services.mongodb.ports[27017] }}
- run: yarn check-translations
env:
DBHOST: localhost:${{ job.services.mongodb.ports[27017] }}