forked from mbasa/pgGeocoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from mbasa/develop
Develop
- Loading branch information
Showing
28 changed files
with
10,513 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Test Ubuntu | ||
|
||
on: | ||
push: | ||
pull_request: | ||
branches: | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test-ubuntu: | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ubuntu-24.04] | ||
|
||
steps: | ||
- name: Checkout pgGeocoder | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set PostgreSQL/PostGIS major version | ||
run: | | ||
pg_major=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()') | ||
echo "PG_MAJOR=${pg_major}" >> $GITHUB_ENV | ||
echo "POSTGIS_MAJOR=3" >> $GITHUB_ENV | ||
- name: Add PostgreSQL APT repository | ||
run: | | ||
sudo apt-get install curl ca-certificates gnupg | ||
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - | ||
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \ | ||
$(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y \ | ||
libtap-parser-sourcehandler-pgtap-perl \ | ||
postgresql-${PG_MAJOR} \ | ||
postgresql-${PG_MAJOR}-pgtap \ | ||
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR} \ | ||
postgresql-${PG_MAJOR}-postgis-${POSTGIS_MAJOR}-scripts | ||
- name: Start PostgreSQL (with trust authentication) | ||
run: | | ||
sudo sed -i "s/\(peer\|scram-sha-256\)$/trust/g" "/etc/postgresql/${PG_MAJOR}/main/pg_hba.conf" | ||
sudo cat "/etc/postgresql/${PG_MAJOR}/main/pg_hba.conf" | ||
sudo systemctl start postgresql.service | ||
- name: Wait PostgreSQL launch | ||
run: | | ||
pg_isready -U postgres -h localhost -p 5432 | ||
psql -U postgres -h localhost -p 5432 -c "SELECT version();" | ||
- name: Set up database | ||
run: | | ||
cp .env.example .env | ||
cp tests/.env.test tests/.env | ||
bash tests/create_test_db_from_fixtures.sh | ||
- name: Run test | ||
run: | | ||
cd tests | ||
pg_prove -U postgres -h localhost -p 5432 -d addresses_test addresses.test.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ | |
|
||
data/ | ||
work/ | ||
tests/fixtures/address_?.csv | ||
.DS_Store | ||
.project | ||
.idea/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
UPDATE pggeocoder.address_s SET shikuchoson = '鎌ケ谷市' WHERE todofuken = '千葉県' AND shikuchoson = '鎌ヶ谷市'; | ||
UPDATE pggeocoder.address_o SET shikuchoson = '鎌ケ谷市' WHERE todofuken = '千葉県' AND shikuchoson = '鎌ヶ谷市'; | ||
UPDATE pggeocoder.address_c SET shikuchoson = '鎌ケ谷市' WHERE todofuken = '千葉県' AND shikuchoson = '鎌ヶ谷市'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
todofuken,shikuchoson,tr_shikuchoson,lat,lon,code,geog | ||
北海道,札幌市,,43.061972,141.354374,01100,SRID=4326;POINT(141.354374 43.061972) | ||
宮城県,仙台市,,38.268008,140.869617,04100,SRID=4326;POINT(140.869617 38.268008) | ||
埼玉県,さいたま市,,35.861515,139.645502,11100,SRID=4326;POINT(139.645502 35.861515) | ||
千葉県,千葉市,,35.607331,140.10638,12100,SRID=4326;POINT(140.10638 35.607331) | ||
神奈川県,横浜市,,35.444035,139.637954,14100,SRID=4326;POINT(139.637954 35.444035) | ||
神奈川県,川崎市,,35.530806,139.703012,14130,SRID=4326;POINT(139.703012 35.530806) | ||
神奈川県,相模原市,,35.571376,139.373268,14150,SRID=4326;POINT(139.373268 35.571376) | ||
新潟県,新潟市,,37.916128,139.036402,15100,SRID=4326;POINT(139.036402 37.916128) | ||
静岡県,静岡市,,34.975473,138.382388,22100,SRID=4326;POINT(138.382388 34.975473) | ||
静岡県,浜松市,,34.710865,137.726117,22130,SRID=4326;POINT(137.726117 34.710865) | ||
愛知県,名古屋市,,35.181433,136.906421,23100,SRID=4326;POINT(136.906421 35.181433) | ||
京都府,京都市,,35.011574,135.768181,26100,SRID=4326;POINT(135.768181 35.011574) | ||
大阪府,大阪市,,34.693891,135.502046,27100,SRID=4326;POINT(135.502046 34.693891) | ||
大阪府,堺市,,34.573354,135.48302,27140,SRID=4326;POINT(135.48302 34.573354) | ||
兵庫県,神戸市,,34.689495,135.195728,28100,SRID=4326;POINT(135.195728 34.689495) | ||
岡山県,岡山市,,34.655107,133.919566,33100,SRID=4326;POINT(133.919566 34.655107) | ||
広島県,広島市,,34.385253,132.455337,34100,SRID=4326;POINT(132.455337 34.385253) | ||
福岡県,北九州市,,33.883408,130.875183,40100,SRID=4326;POINT(130.875183 33.883408) | ||
福岡県,福岡市,,33.590313,130.401735,40130,SRID=4326;POINT(130.401735 33.590313) | ||
熊本県,熊本市,,32.803078,130.707897,43100,SRID=4326;POINT(130.707897 32.803078) | ||
todofuken,shikuchoson,tr_shikuchoson,lat,lon,code,geog,year | ||
北海道,札幌市,,43.061972,141.354374,01100,SRID=4326;POINT(141.354374 43.061972),2023 | ||
宮城県,仙台市,,38.268008,140.869617,04100,SRID=4326;POINT(140.869617 38.268008),2023 | ||
埼玉県,さいたま市,,35.861515,139.645502,11100,SRID=4326;POINT(139.645502 35.861515),2023 | ||
千葉県,千葉市,,35.607331,140.10638,12100,SRID=4326;POINT(140.10638 35.607331),2023 | ||
神奈川県,横浜市,,35.444035,139.637954,14100,SRID=4326;POINT(139.637954 35.444035),2023 | ||
神奈川県,川崎市,,35.530806,139.703012,14130,SRID=4326;POINT(139.703012 35.530806),2023 | ||
神奈川県,相模原市,,35.571376,139.373268,14150,SRID=4326;POINT(139.373268 35.571376),2023 | ||
新潟県,新潟市,,37.916128,139.036402,15100,SRID=4326;POINT(139.036402 37.916128),2023 | ||
静岡県,静岡市,,34.975473,138.382388,22100,SRID=4326;POINT(138.382388 34.975473),2023 | ||
静岡県,浜松市,,34.710865,137.726117,22130,SRID=4326;POINT(137.726117 34.710865),2023 | ||
愛知県,名古屋市,,35.181433,136.906421,23100,SRID=4326;POINT(136.906421 35.181433),2023 | ||
京都府,京都市,,35.011574,135.768181,26100,SRID=4326;POINT(135.768181 35.011574),2023 | ||
大阪府,大阪市,,34.693891,135.502046,27100,SRID=4326;POINT(135.502046 34.693891),2023 | ||
大阪府,堺市,,34.573354,135.48302,27140,SRID=4326;POINT(135.48302 34.573354),2023 | ||
兵庫県,神戸市,,34.689495,135.195728,28100,SRID=4326;POINT(135.195728 34.689495),2023 | ||
岡山県,岡山市,,34.655107,133.919566,33100,SRID=4326;POINT(133.919566 34.655107),2023 | ||
広島県,広島市,,34.385253,132.455337,34100,SRID=4326;POINT(132.455337 34.385253),2023 | ||
福岡県,北九州市,,33.883408,130.875183,40100,SRID=4326;POINT(130.875183 33.883408),2023 | ||
福岡県,福岡市,,33.590313,130.401735,40130,SRID=4326;POINT(130.401735 33.590313),2023 | ||
熊本県,熊本市,,32.803078,130.707897,43100,SRID=4326;POINT(130.707897 32.803078),2023 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.