-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from samansmink/add-better-ci
fix curl issue, improve ci
- Loading branch information
Showing
6 changed files
with
198 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Local functional tests | ||
on: [push, pull_request,repository_dispatch] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref || '' }}-${{ github.base_ref || '' }}-${{ github.ref != 'refs/heads/main' || github.sha }} | ||
cancel-in-progress: true | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
BASE_BRANCH: ${{ github.base_ref || (endsWith(github.ref, '_feature') && 'feature' || 'main') }} | ||
|
||
jobs: | ||
unity-catalog-local-linux: | ||
name: Local UC test server tests (Linux) | ||
runs-on: ubuntu-latest | ||
env: | ||
VCPKG_TARGET_TRIPLET: 'x64-linux' | ||
GEN: ninja | ||
VCPKG_TOOLCHAIN_PATH: ${{ github.workspace }}/vcpkg/scripts/buildsystems/vcpkg.cmake | ||
UC_TEST_SERVER_RUNNING: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: 'true' | ||
|
||
- name: Configure OpenSSL for Rust | ||
run: | | ||
echo "OPENSSL_ROOT_DIR=`pwd`/build/release/vcpkg_installed/x64-linux" >> $GITHUB_ENV | ||
echo "OPENSSL_DIR=`pwd`/build/release/vcpkg_installed/x64-linux" >> $GITHUB_ENV | ||
echo "OPENSSL_USE_STATIC_LIBS=true" >> $GITHUB_ENV | ||
- name: Install Ninja | ||
shell: bash | ||
run: sudo apt-get update -y -qq && sudo apt-get install -y -qq ninja-build | ||
|
||
- name: Setup Ccache | ||
uses: hendrikmuhs/ccache-action@main | ||
with: | ||
key: ${{ github.job }} | ||
|
||
- name: Setup vcpkg | ||
uses: lukka/run-vcpkg@v11.1 | ||
with: | ||
vcpkgGitCommitId: a1a1cbc975abf909a6c8985a6a2b8fe20bbd9bd6 | ||
|
||
- uses: actions/setup-node@v4 | ||
|
||
- name: Setup Unity Catalog test server | ||
run: | | ||
sudo apt install default-jre | ||
git clone https://github.com/unitycatalog/unitycatalog.git | ||
./bin/start-uc-server & | ||
sleep 10 | ||
- name: Build extension | ||
run: | | ||
make release | ||
- name: Test extension | ||
run: | | ||
make test_release | ||
- name: Move ssl certificate to ensure we still find it | ||
run: | | ||
sudo mv /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem | ||
- name: Test extension | ||
run: | | ||
make test_release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# name: test/sql/uc_cert.test | ||
# description: test uc_catalog ssl cert with a correctly placed cert | ||
# group: [uc_catalog] | ||
|
||
# Require statement will ensure this test is run with this extension loaded | ||
require parquet | ||
|
||
require uc_catalog | ||
|
||
require httpfs | ||
|
||
statement ok | ||
CREATE SECRET ( | ||
TYPE UC, | ||
TOKEN 'not-used', | ||
ENDPOINT 'https://duckdb.org', | ||
AWS_REGION 'us-east-2' | ||
); | ||
|
||
# Catalog Secret | ||
statement ok | ||
ATTACH 'unity' AS unity (TYPE UC_CATALOG); | ||
|
||
# This would throw SSL cert error if ssl cert is not properly found | ||
statement ok | ||
SELECT database_name, schema_name, table_name FROM duckdb_tables() where database_name='unity' order by table_name; |