File: github-ci.sh

package info (click to toggle)
rdflib-sqlalchemy 0.5.4%2Bgit99f4689-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 10,544 kB
  • sloc: python: 2,418; sh: 20; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 580 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash -ex

if [ "$DB" = 'pgsql' ]; then
    echo localhost:5432:postgres:postgres:postgres > ~/.pgpass
    chmod 0600 ~/.pgpass
    psql -w -h localhost -c 'DROP DATABASE IF EXISTS test;' -U postgres
    psql -w -h localhost -c 'create database test;' -U postgres
    # ~/.pgpass doesn't work apparently...whatever
    export DBURI='postgresql+psycopg2://postgres:postgres@localhost/test'
fi

if [ "$DB" = 'mysql' ]; then
    export DBURI='mysql+mysqldb://test:mysql@127.0.0.1/test?charset=utf8'
fi

if [ "$DB" = 'sqlite' ]; then
    export DBURI='sqlite:///test.sqlite'
fi