Fix estat 2020 data import #14
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
name: Test macOS | |
on: | |
push: | |
pull_request: | |
branches: | |
- develop | |
workflow_dispatch: | |
jobs: | |
test-macos: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest] | |
steps: | |
- name: Checkout pgGeocoder | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
brew install postgresql postgis | |
- name: Install pgTAP | |
run: | | |
git clone https://github.com/theory/pgtap.git pgTapExtension | |
cd pgTapExtension | |
make -j | |
make install | |
cpan TAP::Parser::SourceHandler::pgTAP | |
ln -s $(find `brew --prefix` -name pg_prove) symlink it into $(brew --prefix)/bin | |
- name: Start PostgreSQL | |
run: | | |
pg_ctl -D $(brew --prefix)/var/postgresql@14 start | |
createuser -s postgres | |
- 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/normalize-japanese-addresses | |
pg_prove -U postgres -h localhost -p 5432 -d addresses_test addresses.test.sql | |
pg_prove -U postgres -h localhost -p 5432 -d addresses_test main.test.sql |