Skip to content

made minor corrections by adding the error functions. Those functions… #136

made minor corrections by adding the error functions. Those functions…

made minor corrections by adding the error functions. Those functions… #136

name: Python Driver Tests
on:
push:
branches: [ "master", "PG16" ]
pull_request:
branches: [ "master", "PG16" ]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: drivers/python
steps:
- uses: actions/checkout@v3
- name: Set tag based on branch
run: |
if [[ "$GITHUB_EVENT_NAME" == "push" ]]; then
if [[ "$GITHUB_REF" == "refs/heads/master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_REF" == "refs/heads/PG16" ]]; then
echo "TAG=PG16_latest" >> $GITHUB_ENV
fi
elif [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then
if [[ "$GITHUB_BASE_REF" == "master" ]]; then
echo "TAG=latest" >> $GITHUB_ENV
elif [[ "$GITHUB_BASE_REF" == "PG16" ]]; then
echo "TAG=PG16_latest" >> $GITHUB_ENV
fi
fi
- name: Run apache/age docker image
run: |
export TAG=$TAG
docker-compose up -d
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install pre-requisites
run: |
sudo apt-get install python3-dev libpq-dev
pip install -r requirements.txt
- name: Build
run: |
python setup.py install
- name: Test
run: |
python test_age_py.py -db "postgres" -u "postgres" -pass "agens"
python -m unittest -v test_agtypes.py