forked from fkarb/sqlalchemy-monetdb
-
Notifications
You must be signed in to change notification settings - Fork 17
58 lines (55 loc) · 2.39 KB
/
linux.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
49
50
51
52
53
54
55
56
57
58
name: Linux
on: [push]
jobs:
linux-test:
runs-on: ubuntu-20.04
env:
DBFARM: /var/lib/monetdb
DATABASE: test
continue-on-error: true
strategy:
matrix:
branch: [default]
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Debian packages
run: |
sudo apt-get update -qq
sudo apt-get install -y software-properties-common curl make
curl https://www.monetdb.org/downloads/MonetDB-GPG-KEY | sudo apt-key add -
sudo add-apt-repository 'deb http://dev.monetdb.org/downloads/deb/ focal monetdb'
sudo apt-get update -qq
sudo apt-get install -y monetdb5-server monetdb5-sql monetdb-client
- name: Start MonetDB
run: |
sudo mkdir -p -m 770 ${{ env.DBFARM }}
sudo chown -R monetdb.monetdb ${{ env.DBFARM }}
sudo -u monetdb monetdbd create ${{ env.DBFARM }}
sudo -u monetdb monetdbd set control=yes ${{ env.DBFARM }}
sudo -u monetdb monetdbd set passphrase=testdb ${{ env.DBFARM }}
sudo -u monetdb monetdbd start ${{ env.DBFARM }}
sudo -u monetdb chmod o+rwx /tmp/.s.mero*
- name: Create MonetDB ${{ env.DATABASE }} database
run: |
sudo -u monetdb monetdb create ${{ env.DATABASE }}
sudo -u monetdb monetdb set embedpy3=true ${{ env.DATABASE }}
sudo -u monetdb monetdb release ${{ env.DATABASE }}
sudo -u monetdb monetdb start ${{ env.DATABASE }} || true
sudo cat /var/lib/monetdb/merovingian.log
sudo -u monetdb monetdb status
sudo -u monetdb mclient -d "monetdb://localhost:50000/test?user=monetdb&password=monetdb" -s "create schema test_schema;"
sudo -u monetdb mclient -d "monetdb://localhost:50000/test?user=monetdb&password=monetdb" -s "create schema test_schema2;"
sudo -u monetdb mclient -d "monetdb://localhost:50000/test?user=monetdb&password=monetdb" -s "alter user monetdb set schema test_schema2;"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# - name: Setup database
# run: |
# cd test
# ./initfarm.sh
# ./initdb.sh
- name: Run tests
run: make pytest