Skip to content

Support Test and CI

Support Test and CI #3

Workflow file for this run

name: Test macOS
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- 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