-
Notifications
You must be signed in to change notification settings - Fork 0
0.1.0 #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.1.0 #14
Changes from all commits
5b22a0c
bf25f8e
93e1c93
e8d48ed
72bca0e
7ce6ca7
0a7e459
cc32252
ab96328
176fb1a
80667da
85c1342
0777861
a9daf2c
f03c666
e7e1c30
6ef5843
2aaa190
f76a470
41c202b
87c6516
4d5d951
2528bd8
23c8d81
61c1697
2e7ef58
2c57944
026754b
49a280c
a68ce86
cf9792d
2b94a84
8c8f7ec
cc22ded
635ff66
cb13838
4432c03
059bcb5
c662baa
622c77c
1dd898a
163c2fe
999c035
26f3bea
ade19d1
d225c00
e98c839
6518983
ae2d06a
6a37102
d1ef322
559a3cd
339d8a9
668a5bb
d6fb588
a6ce787
ac4e3bf
0ffe247
3f1208e
029251b
bc22327
f1a21a5
b5ade16
fdf2423
c900baa
4ec66fa
fe9e01c
5d0b68f
dceca46
ced8948
bc8832a
15bfd84
ddc2376
18ba1a8
246b49f
aee18ac
6e88bf0
a66c254
fa84efc
42434a6
c0861dc
eac5bd5
c3a0928
8aedbc4
a726428
4e197c3
f5d1c2e
3732cd0
81a975b
1b7ed53
b01e071
5a9464b
0ec2571
8527d09
d30ddf0
23cacdc
f0f80f9
887b1ef
d3b84ed
45d6252
c17d2e1
54bb9b7
1c13b33
e12f3ee
d40744b
a49060d
ad8946e
e8ca56e
76fffcb
9f1a445
3f9bdfd
3c085c3
1b03e86
eef92c5
c5d51cb
876b2f6
a3f6613
ea814da
7173646
cc1d43f
4689aa9
d613ccd
9c51555
6189f8d
de51484
1dabf22
7749d3f
5bb7d11
fc2990c
e608ce8
b4a56ae
448ac0c
1bb8fbe
46d0d06
aaf433e
24b4602
9217108
a195330
237fb95
4fa68b9
3536e6e
a560876
1f97c76
b5a4031
e0c9f30
4ea3e2c
6c0aed3
58e8c7c
ec4be33
0a2ede9
82784eb
19b89df
4d2b037
09c7fcb
941778e
229b1c5
eeefd86
852c0c4
91ff30f
c47d07f
258b6de
b70bb92
44ddbfd
c6bb613
bd3ac9c
92f19a8
55fa288
ae2ce64
3a3e63d
a8850c3
f65e7e7
62f9b58
6caae7d
0b6d318
26791c4
3dc6ded
be5b38b
1c25ef9
179574c
68b29b9
d52f9d3
872ef3b
cb81f3f
119b412
19e6659
6632a63
1c383fe
588e673
4c46357
1a5f0a4
9f21b64
03d24d2
c02c9b7
1f7bf3a
5406ea1
3541c48
ebc5efe
5b607a6
5e6ff68
259a029
5084e3b
0d37f0b
c7e87dd
516d103
04de080
57361c3
2d44e7b
5955e13
7f55e46
bfbeb91
c51a011
196ab76
59fcd5a
e606411
7d21029
2da6181
78abec2
c4d3fc1
7e7d2ae
e0a70fc
9669e69
f6a7f18
28bf145
7a13488
7595b04
eb63dff
5ab7784
308fe5e
ad94743
97415fe
9916991
f815de7
117ce76
4b2a521
82cd127
2577db4
e2ca1b1
4ad4d0c
2efa015
a9aa8db
e5dd67f
c8e815c
84e71e9
9422a04
4628395
4454246
73bb042
d83f18b
e95c4e9
c340fd4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,3 +16,4 @@ commitlint.config.json | |
| dist | ||
| build | ||
| reports | ||
| devScripts | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,196 @@ | ||
| name: pull_request | ||
|
|
||
| on: [pull_request] | ||
| on: [pull_request, workflow_dispatch] | ||
|
|
||
| jobs: | ||
| pull_request: | ||
| uses: MapColonies/shared-workflows/.github/workflows/pull_request.yaml@master | ||
| secrets: inherit | ||
| eslint: | ||
| name: Run eslint | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: 12 | ||
|
|
||
| - name: Install dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Run linters | ||
| uses: wearerequired/lint-action@v1 | ||
| with: | ||
| github_token: ${{ secrets.github_token }} | ||
| # Enable linters | ||
| eslint: true | ||
| prettier: true | ||
| eslint_extensions: ts | ||
|
|
||
| - name: OpenAPI Lint Checks | ||
| uses: nwestfall/openapi-action@v1.0.2 | ||
| with: | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| file: ./openapi3.yaml | ||
|
|
||
| integration-test: | ||
| name: Run Integration Tests | ||
| runs-on: ubuntu-latest | ||
| container: node:16 | ||
|
|
||
| services: | ||
| # Label used to access the service container | ||
| elasticsearch: | ||
| # Docker Hub image | ||
| image: elasticsearch:8.13.0 | ||
| env: | ||
| discovery.type: single-node | ||
| xpack.security.enabled: false | ||
| xpack.security.enrollment.enabled: false | ||
| ES_JAVA_OPTS: "-Xms512m -Xmx512m" | ||
| ports: | ||
| - 9200:9200 | ||
| # Set health checks to wait until elastic has started | ||
| options: >- | ||
| --health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| minio: | ||
| # Docker Hub image | ||
| image: minio/minio:edge-cicd | ||
| env: | ||
| MINIO_ROOT_USER: minio | ||
| MINIO_ROOT_PASSWORD: minio123 | ||
| ports: | ||
| - 9000:9000 | ||
| # Set health checks to wait until elastic has started | ||
| options: >- | ||
| --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node: [18.x, 20.x] | ||
|
|
||
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
|
|
||
| - name: Install Node.js dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Wait for Elasticsearch | ||
| run: | | ||
| until curl -s http://elasticsearch:9200/_cluster/health | grep '"status":"green"'; do | ||
| echo "Waiting for Elasticsearch..."; | ||
| sleep 5; | ||
| done | ||
|
|
||
| - name: Run integration tests | ||
| run: npm run test:integration | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Test Reporters | ||
| path: reports/** | ||
|
|
||
| unit-test: | ||
| name: Run Unit Tests | ||
| runs-on: ubuntu-latest | ||
| container: node:16 | ||
|
|
||
| services: | ||
| # Label used to access the service container | ||
| elasticsearch: | ||
| # Docker Hub image | ||
| image: elasticsearch:8.13.0 | ||
| env: | ||
| discovery.type: single-node | ||
| xpack.security.enabled: false | ||
| xpack.security.enrollment.enabled: false | ||
| ES_JAVA_OPTS: "-Xms512m -Xmx512m" | ||
| ports: | ||
| - 9200:9200 | ||
| # Set health checks to wait until elastic has started | ||
| options: >- | ||
| --health-cmd "curl -f http://localhost:9200/_cluster/health || exit 1" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| minio: | ||
| # Docker Hub image | ||
| image: minio/minio:edge-cicd | ||
| env: | ||
| MINIO_ROOT_USER: minio | ||
| MINIO_ROOT_PASSWORD: minio123 | ||
| ports: | ||
| - 9000:9000 | ||
| # Set health checks to wait until elastic has started | ||
| options: >- | ||
| --health-cmd "curl -f http://localhost:9000/minio/health/live || exit 1" | ||
| --health-interval 10s | ||
| --health-timeout 5s | ||
| --health-retries 5 | ||
|
|
||
| strategy: | ||
| matrix: | ||
| node: [18.x, 20.x] | ||
|
|
||
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: Set up Node.js | ||
| uses: actions/setup-node@v1 | ||
| with: | ||
| node-version: ${{ matrix.node }} | ||
|
|
||
| - name: Install Node.js dependencies | ||
| run: npm ci | ||
|
|
||
| - name: Wait for Elasticsearch | ||
| run: | | ||
| until curl -s http://elasticsearch:9200/_cluster/health | grep '"status":"green"'; do | ||
| echo "Waiting for Elasticsearch..."; | ||
| sleep 5; | ||
| done | ||
|
|
||
| - name: Run unit tests | ||
| run: npm run test:unit | ||
|
|
||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: Test Reporters | ||
| path: reports/** | ||
|
|
||
| security: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@master | ||
| - name: Run Snyk to check for vulnerabilities | ||
| uses: snyk/actions/node@master | ||
| continue-on-error: true | ||
| env: | ||
| SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
|
||
| build_image: | ||
| name: Build Image | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Check out Git repository | ||
| uses: actions/checkout@v2 | ||
|
|
||
| - name: build Docker image | ||
| run: docker build -t test-build:latest . |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,22 +28,21 @@ | |
| "db": { | ||
| "elastic": { | ||
| "control": { | ||
| "node": "http://localhost:9200", | ||
| "node": "http://control_elastic:9200", | ||
| "auth": { | ||
| "username": "control", | ||
| "password": "password" | ||
| "username": "elastic", | ||
| "password": "changeme" | ||
|
Comment on lines
+31
to
+34
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should stay as default values. These seem to be actual credentials (even if for local work).
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| }, | ||
| "requestTimeout": 60000, | ||
| "properties": { | ||
| "index": "control_index", | ||
| "defaultResponseLimit": 3 | ||
| "index": "control_index" | ||
| } | ||
| }, | ||
| "geotext": { | ||
| "node": "http://localhost:9200", | ||
| "node": "http://geotext_elastic:9200", | ||
| "auth": { | ||
| "username": "geotext", | ||
| "password": "password" | ||
| "username": "elastic", | ||
| "password": "changeme" | ||
|
Comment on lines
+42
to
+45
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here. |
||
| }, | ||
| "requestTimeout": 60000, | ||
| "properties": { | ||
|
|
@@ -52,25 +51,37 @@ | |
| "placetypes": "placetypes_index", | ||
| "hierarchies": "hierarchies_index" | ||
| }, | ||
| "defaultResponseLimit": 3, | ||
| "textTermLanguage": "en" | ||
| } | ||
| } | ||
| }, | ||
| "postgresql": { | ||
| "type": "postgres", | ||
| "host": "localhost", | ||
| "port": 5432, | ||
| "username": "postgres", | ||
| "password": "postgres", | ||
| "s3": { | ||
| "endpoint": "http://s3:9000", | ||
| "credentials": { | ||
| "accessKeyId": "accessKeyId", | ||
| "secretAccessKey": "secretAccessKey" | ||
| }, | ||
| "forcePathStyle": true, | ||
| "region": "local", | ||
| "files": { | ||
| "latLonConvertionTable": { | ||
| "bucket": "geocoding", | ||
| "fileName": "table.json" | ||
| } | ||
| } | ||
| }, | ||
| "redis": { | ||
| "host": "REDIS_HOST", | ||
| "port": 6379, | ||
| "username": "", | ||
| "password": "", | ||
| "enableSslAuth": false, | ||
| "sslPaths": { | ||
| "ca": "", | ||
| "key": "", | ||
| "cert": "" | ||
| }, | ||
| "database": "postgres", | ||
| "schema": "geocoder" | ||
| "database": 0 | ||
| } | ||
| }, | ||
| "application": { | ||
|
|
@@ -85,12 +96,10 @@ | |
| "hierarchy": 1.1, | ||
| "viewbox": 1.1 | ||
| }, | ||
| "sources": { | ||
| "SOURCE_A": "a", | ||
| "SOURCE_B": "b" | ||
| }, | ||
| "sources": {}, | ||
| "regions": {}, | ||
| "nameTranslationsKeys": ["en", "fr"], | ||
| "controlObjectDisplayNamePrefixes": {}, | ||
| "nameTranslationsKeys": [], | ||
| "mainLanguageRegex": "[a-zA-Z]" | ||
| } | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is supposed to be a large file, don't we want to provide it in another way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the config and metadata for the files that are being stores in S3.
This way the service knows what bucket and file's name to pull.