-
Notifications
You must be signed in to change notification settings - Fork 38
96 lines (92 loc) · 3.43 KB
/
ibis-ci.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: ibis CI
on:
pull_request:
paths:
- 'ibis-server/**'
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}
cancel-in-progress: true
defaults:
run:
working-directory: ibis-server
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Ruff check
uses: chartboost/ruff-action@v1
with:
src: './ibis-server'
args: 'format --check'
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
cache: 'maven'
- name: Start Wren JAVA engine
if: false # Skip this step for now to test
working-directory: .
run: |
mkdir etc
echo "node.environment=production" >> etc/config.properties
echo "wren.directory=./etc/mdl" >> etc/config.properties
echo "wren.experimental-enable-dynamic-fields=true" >> etc/config.properties
./mvnw clean install -B -DskipTests -P exec-jar
java -Dconfig=etc/config.properties \
--add-opens=java.base/java.nio=ALL-UNNAMED \
-jar ./wren-server/target/wren-server-*-executable.jar &
- name: Install poetry
run: pipx install poetry
- uses: actions/setup-python@v5
with:
python-version-file: ./ibis-server/pyproject.toml
cache: 'poetry'
- name: Install dependencies
run: poetry install
- name: Cache Cargo
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
wren-modeling-py/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('wren-modeling-py/Cargo.lock') }}
- name: Install FreeTDS to be a ODBC driver
run: |
sudo apt-get update -y && sudo apt-get install -y unixodbc-dev freetds-dev
find /usr/lib -name "libtdsodbc.so"
cat << EOF > tds.driver.template
[FreeTDS]
Description = FreeTDS driver
Driver = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
Setup = /usr/lib/x86_64-linux-gnu/odbc/libtdsodbc.so
EOF
odbcinst -i -d -f tds.driver.template
- uses: PyO3/maturin-action@v1
with:
working-directory: wren-modeling-py
command: build
- name: Install wren-modeling-py
run: poetry run pip install ../wren-modeling-py/target/wheels/wren_modeling_py-*.whl
- name: Run tests
env:
WREN_ENGINE_ENDPOINT: http://localhost:8080
run: poetry run pytest -m "not bigquery and not snowflake"
- name: Test bigquery if need
if: contains(github.event.pull_request.labels.*.name, 'bigquery')
env:
WREN_ENGINE_ENDPOINT: http://localhost:8080
TEST_BIG_QUERY_PROJECT_ID: ${{ secrets.TEST_BIG_QUERY_PROJECT_ID }}
TEST_BIG_QUERY_CREDENTIALS_BASE64_JSON: ${{ secrets.TEST_BIG_QUERY_CREDENTIALS_BASE64_JSON }}
run: poetry run pytest -m bigquery
- name: Test snowflake if need
if: contains(github.event.pull_request.labels.*.name, 'snowflake')
env:
WREN_ENGINE_ENDPOINT: http://localhost:8080
SNOWFLAKE_USER: ${{ secrets.SNOWFLAKE_USER }}
SNOWFLAKE_PASSWORD: ${{ secrets.SNOWFLAKE_PASSWORD }}
SNOWFLAKE_ACCOUNT: ${{ secrets.SNOWFLAKE_ACCOUNT }}
run: poetry run pytest -m snowflake