22 Commits

Author SHA1 Message Date
Manuel López Ruiz
295c65df4b Merge pull request #250 from CartoDB/fix/ch175898/gcp-github-actions
fixed gcloud github actions
2022-03-30 18:03:43 +02:00
Manuel López Ruiz
388f7f1d42 Merge branch 'master' into fix/ch175898/gcp-github-actions 2022-03-30 18:03:23 +02:00
Manuel López Ruiz
e5273752b2 Merge pull request #252 from CartoDB/chore/sc-219063/JGPR9LOT
Fix deprecation notice GHAction
2022-03-30 17:23:18 +02:00
Manuel López Ruiz
6e300ca54b Changes applyed to JGPR9LOT 2022-03-30 13:31:08 +02:00
Manuel López Ruiz
6c43676d86 Changes applyed to SUWTMI4X 2022-03-30 13:31:07 +02:00
Shylpx
bfed1cf07f Merge pull request #251 from CartoDB/feature/sc-208491/pilote-modernisation-typo-in-internal-geocoder
[sc208491] Fix 'Haut-Rhin' France region typo
2022-03-29 09:16:02 +01:00
cgonzalez
2f91f16c2a Fix typo regarding 'Haut-Rhin' region 2022-03-25 16:24:25 +00:00
Miguel Angel Moreno
759a875e7c Dummy commit 2022-03-07 16:35:52 +01:00
Manuel López Ruiz
aa2c8a35d4 Delete gcloud from CI 2021-12-21 10:41:40 +01:00
Manuel López Ruiz
5ab3165ef9 Re-exec tests 2021-12-21 10:33:50 +01:00
alvarorm22
71c0063977 fixed gcloud github actions setup 2021-08-27 11:55:46 +02:00
Shylpx
b0b19b447d Merge pull request #249 from CartoDB/feature/ch124507/outdated-carto-country-geocoding-does-not
[ch124507] Add new SQL patch adding 'North Macedonia'
2021-01-21 09:45:54 +00:00
cgonzalez
5e16c16275 Add new SQL patch adding aliases for 'North Macedonia' 2021-01-18 17:48:36 +00:00
ibrahim
af848aa65b Add postgresql12 ci 2020-02-06 13:11:53 +01:00
Rafa de la Torre
629a453516 Merge pull request #248 from CartoDB/add-github-actions
add CI tests to github actions
2020-01-30 16:32:54 +01:00
ibrahim
d5470d7fa8 add CI tests to github actions 2020-01-30 15:15:50 +01:00
Gonzalo Riestra
ac1e26fda0 Merge pull request #246 from CartoDB/14620-fix-download-script
Fix download patches script
2019-01-18 10:05:39 +01:00
Gonzalo Riestra
0341a4ef91 remove trailing comma 2019-01-17 15:46:07 +01:00
Gonzalo Riestra
474e093abb Merge pull request #245 from CartoDB/s1904_fix_france_region_typos
Fix two france regions with typo
2019-01-16 11:28:03 +01:00
Mario de Frutos
f693b935c0 Fix two france regions with typo 2019-01-11 16:45:33 +01:00
Mario de Frutos
677c522926 Merge pull request #244 from CartoDB/243_add_synomyms_swaziland
Add new patch to include new synonyms for Swaziland
2018-10-15 12:09:54 +02:00
Mario de Frutos
8920403fbd Add new patch to include new synonyms for Swaziland 2018-10-11 18:15:50 +02:00
7 changed files with 75 additions and 1 deletions

39
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: data-services PR testing
on: push
jobs:
data-services:
runs-on: ubuntu-latest
strategy:
matrix:
pg_version: [10, 12]
env:
PG_VERSION: ${{ matrix.pg_version }}
steps:
- uses: actions/checkout@v1
- name: Set up docker registry
env:
SA_TO_USE: ${{ secrets.GCS }}
run: |
echo "${SA_TO_USE}" | base64 -d | docker login -u _json_key --password-stdin https://gcr.io
- name: Pull base image
run: docker pull gcr.io/cartodb-on-gcp-ci-testing/cartodb-postgresql-base:${{ matrix.pg_version }}
- name: Checkout ci tools repository
uses: actions/checkout@v2
with:
repository: CartoDB/ci-tools
path: ci-tools
token: ${{ secrets.CARTOFANTE_PAT }}
- name: Copy ci files to root
run: cp ci-tools/repos/${{ github.event.repository.name }}/* .
- name: Start docker-compose services
run: docker-compose -f docker-compose.yaml up -d
- name: Run tests
run: docker-compose -f docker-compose.yaml exec -T postgres-server bash -c "cd /data-services/geocoder/extension && make clean all install installcheck"
timeout-minutes: 5

1
geocoder/.gitignore vendored
View File

@@ -1 +1,2 @@
db_dumps/
data_patches/

View File

@@ -0,0 +1,9 @@
DO $$
DECLARE updated INTEGER;
BEGIN
SELECT count(*) FROM admin0_synonyms WHERE adm0_a3 = 'SWZ' GROUP BY adm0_a3 HAVING count(*) > 0 INTO updated;
IF updated = 4 THEN
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'Eswatini' as name, 6, adm0_a3, 'eswatini' as name_ FROM admin0_synonyms WHERE name_ = 'swaziland';
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'Kingdom of Eswatini' as name, 7, adm0_a3, 'kingdomofeswatini' as name_ FROM admin0_synonyms WHERE name_ = 'swaziland';
END IF;
END$$;

View File

@@ -0,0 +1,9 @@
DO $$
DECLARE updated INTEGER;
BEGIN
SELECT count(*) FROM admin0_synonyms WHERE adm0_a3 = 'MKD' GROUP BY adm0_a3 HAVING count(*) > 0 INTO updated;
IF updated = 6 THEN
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'North Macedonia' as name, 6, adm0_a3, 'northmacedonia' as name_ FROM admin0_synonyms WHERE name_ = 'macedonia';
INSERT INTO admin0_synonyms (name, rank, adm0_a3, name_) SELECT 'Republic of North Macedonia' as name, 7, adm0_a3, 'republicofnorthmacedonia' as name_ FROM admin0_synonyms WHERE name_ = 'macedonia';
END IF;
END$$;

View File

@@ -0,0 +1,9 @@
UPDATE global_province_polygons
SET synonyms = array_append(array_remove(synonyms, 'meurhe-et-moselle'), 'meurthe-et-moselle'),
"name" = 'Meurthe-et-Moselle'
WHERE adm1_code = 'FRA-5325';
UPDATE global_province_polygons
SET synonyms = array_append(array_remove(synonyms, 'seien-et-marne'), 'seine-et-marne'),
"name" = 'Seine-et-Marne'
WHERE adm1_code = 'FRA-5342';

View File

@@ -0,0 +1,3 @@
UPDATE global_province_polygons
SET synonyms = array_append(array_remove(synonyms, 'haut-rhin'), 'haut-rhin')
WHERE adm1_code = 'FRA-5296';

View File

@@ -8,7 +8,11 @@ PATCHES_LIST="20160203_countries_bh_isocode.sql
20160622_countries_synonym_congo.sql
20171004_merge_corsica_and_france.sql
20180117_hsinchu_synonyms.sql
20180306_add_ssd_rows_for_south_sudan.sql"
20180306_add_ssd_rows_for_south_sudan.sql
20181011_add_synonyms_for_swaziland.sql
20190111_france_regions_typos.sql
20210118_add_renamed_country_north_macedonia.sql
20220325_france_region_haut-rhin_typo.sql"
mkdir -p $TARGET_DIR_PATCHES