feat(query): support oracle source #119
Workflow file for this run
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
name: CI | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
services: | ||
databend: | ||
image: docker.io/datafuselabs/databend | ||
env: | ||
QUERY_DEFAULT_USER: databend | ||
QUERY_DEFAULT_PASSWORD: databend | ||
MINIO_ENABLED: true | ||
ports: | ||
- 8000:8000 | ||
- 9000:9000 | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ROOT_PASSWORD: 123456 | ||
MYSQL_DATABASE: default | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=10 | ||
oracle: | ||
image: wnameless/oracle-xe-11g-r2 | ||
environment: | ||
Check failure on line 32 in .github/workflows/ci.yaml
|
||
- ORACLE_PASSWORD=123 | ||
- ORACLE_SID=XE | ||
ports: | ||
- 49161:1521 | ||
volumes: | ||
- oracle-volume:/u01/app/oracle/oradata | ||
options: --health-cmd="nc -z localhost 1521" --health-interval=10s --health-timeout=5s --health-retries=10 | ||
volumes: | ||
oracle-volume: | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Verify Service Running | ||
run: | | ||
sleep 60 | ||
curl -v http://localhost:8000/v1/health | ||
- name: Create Oracle User | ||
run: | | ||
sleep 60 | ||
sqlplus system/123@localhost:49161/XE << EOF | ||
CREATE USER a IDENTIFIED BY 123; | ||
GRANT DBA TO a; | ||
EXIT | ||
EOF | ||
- name: Cache Instant Client | ||
id: cache-instant-client | ||
uses: actions/cache@v3 | ||
with: | ||
path: /opt/oracle/instantclient_23_4 | ||
key: oracle-instant-client-23.4.0.24.05-basic-linux-x64 | ||
- name: Install Oracle Instant Client | ||
run: | | ||
mkdir -p /opt/oracle | ||
cd /opt/oracle | ||
wget https://download.oracle.com/otn_software/linux/instantclient/2340000/instantclient-basic-linux.x64-23.4.0.24.05.zip -O instantclient.zip | ||
unzip instantclient.zip | ||
rm instantclient.zip | ||
- name: Test | ||
env: | ||
TEST_DATABEND_DSN: "http://databend:databend@localhost:8000" | ||
ORACLE_HOME: /opt/oracle/instantclient_23_4 | ||
LD_LIBRARY_PATH: ${{ env.ORACLE_HOME }}:$LD_LIBRARY_PATH | ||
run: | | ||
go test -v -p 1 -cover ./... |