forked from mbasa/pgGeocoder
-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.45 KB
/
test-macos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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