-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (47 loc) · 1.43 KB
/
Copy pathbuild.yml
File metadata and controls
47 lines (47 loc) · 1.43 KB
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
name: Testing
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8','3.10','3.12']
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- uses: actions/checkout@v6
- name: Dependencies
run: |
python -m pip install --upgrade pip
pip install pandas
pip install astropy
pip install duckdb
pip install pytest-cov
pip install coveralls
- name: Install sqlutilpy
run: |
pip install .
- name: Start Postgres
run: |
sudo systemctl start postgresql.service
pg_isready
- name: PG setup
run: |
sudo -u postgres psql -c "create role testuser with login password 'testpassword';" postgres
sudo -u postgres psql -c "GRANT CREATE ON SCHEMA public TO PUBLIC;" postgres
- name: Test sqlutilpy
run: |
export SQLUTIL_TEST_PG_DB='postgres'
export SQLUTIL_TEST_PG_HOST='localhost'
export SQLUTIL_TEST_PG_USER='testuser'
export SQLUTIL_TEST_PG_PASS='testpassword'
py.test --cov=sqlutilpy
- name: Coveralls
if: ${{ success() }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}