-
Notifications
You must be signed in to change notification settings - Fork 33
44 lines (42 loc) · 1.27 KB
/
macos.yaml
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
name: MacOS
on:
push:
branches:
- master
pull_request:
branches: ["*"]
jobs:
test:
name: MacOS
strategy:
matrix:
pg:
- postgresql@12
- postgresql@13
- postgresql@14
- postgresql@15
- postgresql@16
runs-on: macos-14
steps:
- name: os info
run: uname -a
- name: checkout
uses: actions/checkout@v4
- name: setup postgresql
run: |
brew install ${{ matrix.pg }}
brew services start ${{ matrix.pg }}
echo PATH="/opt/homebrew/opt/${{ matrix.pg }}/bin:$PATH" >> $GITHUB_ENV
echo LDFLAGS="-L/opt/homebrew/opt/${{ matrix.pg }}/lib" >> $GITHUB_ENV
echo CPPFLAGS="-I/opt/homebrew/opt/${{ matrix.pg }}/include" >> $GITHUB_ENV
echo PKG_CONFIG_PATH="/opt/homebrew/opt/${{ matrix.pg }}/lib/pkgconfig" >> $GITHUB_ENV
- name: prepare postgresql connection info
run: |
echo POSTGRES_DB=postgres >> $GITHUB_ENV
echo POSTGRES_USER=runner >> $GITHUB_ENV
- name: setup virtualenv
run: python3 -m venv .venv
- name: install python deps
run: .venv/bin/pip3 install pytest psycopg2 pytz
- name: run test
run: .venv/bin/python3 -m pytest -rsfE tests/