2323 pull_request :
2424
2525jobs :
26-
2726 # build the library, a compilation step used by multiple steps below
2827 linux-build-lib :
2928 name : Build Libraries on AMD64 Rust ${{ matrix.rust }}
@@ -61,17 +60,19 @@ jobs:
6160 rustup component add rustfmt
6261 - name : Build Workspace
6362 run : |
64- export CARGO_HOME="/github/home/.cargo"
65- export CARGO_TARGET_DIR="/github/home/target"
6663 cargo build
64+ env :
65+ CARGO_HOME : " /github/home/.cargo"
66+ CARGO_TARGET_DIR : " /github/home/target"
6767 # Ballista is currently not part of the main workspace so requires a separate build step
6868 - name : Build Ballista
6969 run : |
70- export CARGO_HOME="/github/home/.cargo"
71- export CARGO_TARGET_DIR="/github/home/target"
7270 cd ballista/rust
7371 # snmalloc requires cmake so build without default features
7472 cargo build --no-default-features
73+ env :
74+ CARGO_HOME : " /github/home/.cargo"
75+ CARGO_TARGET_DIR : " /github/home/target"
7576
7677 # test the crate
7778 linux-test :
@@ -111,8 +112,6 @@ jobs:
111112 rustup component add rustfmt
112113 - name : Run tests
113114 run : |
114- export CARGO_HOME="/github/home/.cargo"
115- export CARGO_TARGET_DIR="/github/home/target"
116115 export ARROW_TEST_DATA=$(pwd)/testing/data
117116 export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
118117 # run tests on all workspace members with default feature list
@@ -122,16 +121,69 @@ jobs:
122121 cargo test --no-default-features
123122 cargo run --example csv_sql
124123 cargo run --example parquet_sql
124+ env :
125+ CARGO_HOME : " /github/home/.cargo"
126+ CARGO_TARGET_DIR : " /github/home/target"
125127 # Ballista is currently not part of the main workspace so requires a separate test step
126128 - name : Run Ballista tests
127129 run : |
128- export CARGO_HOME="/github/home/.cargo"
129- export CARGO_TARGET_DIR="/github/home/target"
130130 export ARROW_TEST_DATA=$(pwd)/testing/data
131131 export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
132132 cd ballista/rust
133133 # snmalloc requires cmake so build without default features
134134 cargo test --no-default-features
135+ env :
136+ CARGO_HOME : " /github/home/.cargo"
137+ CARGO_TARGET_DIR : " /github/home/target"
138+
139+ integration-test :
140+ name : " Integration Test"
141+ needs : [linux-build-lib]
142+ runs-on : ubuntu-latest
143+ services :
144+ postgres :
145+ image : postgres:13
146+ env :
147+ POSTGRES_PASSWORD : postgres
148+ POSTGRES_DB : db_test
149+ ports :
150+ - 5432/tcp
151+ options : >-
152+ --health-cmd pg_isready
153+ --health-interval 10s
154+ --health-timeout 5s
155+ --health-retries 5
156+ steps :
157+ - uses : actions/checkout@v2
158+ - uses : actions/setup-python@v2
159+ with :
160+ python-version : " 3.8"
161+ - name : Install Python dependencies
162+ run : |
163+ python -m pip install --upgrade pip setuptools wheel
164+ python -m pip install --upgrade numpy==1.20.3 pandas==1.2.4
165+ - name : Allow access of psql
166+ run : |
167+ # make sure psql can access the server
168+ echo "$POSTGRES_HOST:$POSTGRES_PORT:$POSTGRES_DB:$POSTGRES_USER:$POSTGRES_PASSWORD" | tee ~/.pgpass
169+ chmod 0600 ~/.pgpass
170+ psql -d "$POSTGRES_DB" -h "$POSTGRES_HOST" -p "$POSTGRES_PORT" -U "$POSTGRES_USER" -c 'select now() as now'
171+ env :
172+ POSTGRES_HOST : localhost
173+ POSTGRES_PORT : ${{ job.services.postgres.ports[5432] }}
174+ POSTGRES_DB : db_test
175+ POSTGRES_USER : postgres
176+ POSTGRES_PASSWORD : postgres
177+ - name : Build datafusion-cli
178+ run : cargo build --bin datafusion-cli
179+ - name : Test Psql Parity
180+ run : python -m unittest -v integration-tests/test_psql_parity.py
181+ env :
182+ POSTGRES_HOST : localhost
183+ POSTGRES_PORT : ${{ job.services.postgres.ports[5432] }}
184+ POSTGRES_DB : db_test
185+ POSTGRES_USER : postgres
186+ POSTGRES_PASSWORD : postgres
135187
136188 windows-and-macos :
137189 name : Test on ${{ matrix.os }} Rust ${{ matrix.rust }}
@@ -156,9 +208,10 @@ jobs:
156208 run : |
157209 export ARROW_TEST_DATA=$(pwd)/testing/data
158210 export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
159- # do not produce debug symbols to keep memory usage down
160- export RUSTFLAGS="-C debuginfo=0"
161211 cargo test
212+ env :
213+ # do not produce debug symbols to keep memory usage down
214+ RUSTFLAGS : " -C debuginfo=0"
162215
163216 lint :
164217 name : Lint
@@ -212,9 +265,10 @@ jobs:
212265 rustup component add rustfmt clippy
213266 - name : Run clippy
214267 run : |
215- export CARGO_HOME="/github/home/.cargo"
216- export CARGO_TARGET_DIR="/github/home/target"
217268 cargo clippy --all-targets --workspace -- -D warnings
269+ env :
270+ CARGO_HOME : " /github/home/.cargo"
271+ CARGO_TARGET_DIR : " /github/home/target"
218272
219273 miri-checks :
220274 name : MIRI
@@ -242,9 +296,9 @@ jobs:
242296 - name : Run Miri Checks
243297 env :
244298 RUST_BACKTRACE : full
245- RUST_LOG : ' trace'
299+ RUST_LOG : " trace"
300+ MIRIFLAGS : " -Zmiri-disable-isolation"
246301 run : |
247- export MIRIFLAGS="-Zmiri-disable-isolation"
248302 cargo miri setup
249303 cargo clean
250304 # Ignore MIRI errors until we can get a clean run
@@ -275,16 +329,16 @@ jobs:
275329 key : ${{ runner.os }}-${{ matrix.arch }}-target-coverage-cache-${{ matrix.rust }}-
276330 - name : Run coverage
277331 run : |
278- export CARGO_HOME="/home/runner/.cargo"
279- export CARGO_TARGET_DIR="/home/runner/target"
280-
281332 export ARROW_TEST_DATA=$(pwd)/testing/data
282333 export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
283334
284335 # 2020-11-15: There is a cargo-tarpaulin regression in 0.17.0
285336 # see https://github.com/xd009642/tarpaulin/issues/618
286337 cargo install --version 0.16.0 cargo-tarpaulin
287338 cargo tarpaulin --out Xml
339+ env :
340+ CARGO_HOME : " /home/runner/.cargo"
341+ CARGO_TARGET_DIR : " /home/runner/target"
288342 - name : Report coverage
289343 continue-on-error : true
290344 run : bash <(curl -s https://codecov.io/bash)
0 commit comments