forked from mediapredict/daffodil
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.16 KB
/
tests.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
name: CI
# TODO: See if we want to limit this scope to specified repos/forks
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
# Docker hub postgres image
image: postgres:13.5
# Postgres env vars
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: daffodil_hstore_test
# map port on service container to port on docker host
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: psycopg2 prerequisites
run: sudo apt-get install libpq-dev
- name: install python dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install .
- name: execute tests
run: |
python test/tests.py