forked from babelfish-for-postgresql/babelfish_extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (65 loc) · 2.59 KB
/
isolation-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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Babelfish Smoke Tests
on:
push:
branches:
pull_request:
branches:
jobs:
isolation-tests:
name: Isolation-Tests
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
id: checkout
- name: Install Dependencies
id: install-dependencies
if: always()
uses: ./.github/composite-actions/install-dependencies
- name: Build Modified Postgres
id: build-modified-postgres
if: always() && steps.install-dependencies.outcome == 'success'
uses: ./.github/composite-actions/build-modified-postgres
- name: Compile ANTLR
id: compile-antlr
if: always() && steps.build-modified-postgres.outcome == 'success'
uses: ./.github/composite-actions/compile-antlr
- name: Build Extensions
id: build-extensions
if: always() && steps.compile-antlr.outcome == 'success'
uses: ./.github/composite-actions/build-extensions
- name: Install Extensions
id: install-extensions
if: always() && steps.build-extensions.outcome == 'success'
uses: ./.github/composite-actions/install-extensions
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Configure Python environment
run: |
cd ~
curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list | sudo tee /etc/apt/sources.list.d/mssql-release.list
cd ~/work/babelfish_extensions/babelfish_extensions/test/python
sudo ACCEPT_EULA=Y apt-get install -y msodbcsql17 python3-dev
pip3 install pyodbc pymssql pytest pytest-xdist antlr4-python3-runtime==4.9.3
- name: Generate .spec file parser
run: |
cd ~/work/babelfish_extensions/babelfish_extensions/test/python/isolationtest/
java -Xmx500M -cp /usr/local/lib/antlr-4.9.3-complete.jar org.antlr.v4.Tool -Dlanguage=Python3 ./parser/*.g4 -visitor -no-listener
- name: Run Isolation tests
run: |
cd test/python
compareWithFile=true \
driver=pyodbc \
runInParallel=false \
testName=all \
provider="ODBC Driver 17 for SQL Server" \
fileGenerator_URL=localhost \
fileGenerator_port=1433 \
fileGenerator_databaseName=master \
fileGenerator_user=jdbc_user \
fileGenerator_password=12345678 \
inputFilesPath=./input/isolation \
runIsolationTests=true \
stepTimeLimit=30 \
pytest -s --tb=long -q .