chore: test ci #4
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: Check | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
services: | |
databend: | |
image: datafuselabs/databend | |
env: | |
QUERY_DEFAULT_USER: databend | |
QUERY_DEFAULT_PASSWORD: databend | |
MINIO_ENABLED: true | |
# options: >- | |
# --health-cmd "curl -fs http://localhost:8000/v1/health || exit 1" | |
# --health-interval 10s | |
# --health-timeout 5s | |
# --health-retries 5 | |
ports: | |
- 8000:8000 | |
- 9000:9000 | |
steps: | |
- name: Verify Service Running | |
run: | | |
sleep 30 | |
cid=$(docker ps -a | grep databend | cut -d' ' -f1) | |
docker logs ${cid} | |
curl -v http://localhost:8000/v1/health | |
- name: Checkout Metabase Repo | |
uses: actions/checkout@v2 | |
with: | |
repository: metabase/metabase | |
ref: v0.46.0-RC2 | |
- name: Checkout Driver Repo | |
uses: actions/checkout@v2 | |
with: | |
path: modules/drivers/databend | |
- name: Prepare JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Install Clojure CLI | |
run: | | |
curl -O https://download.clojure.org/install/linux-install-1.11.1.1182.sh && | |
sudo bash ./linux-install-1.11.1.1182.sh | |
- name: Setup Node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "16" | |
cache: "yarn" | |
- name: Get M2 cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.m2 | |
~/.gitlibs | |
key: ${{ runner.os }}-databend-${{ hashFiles('**/deps.edn') }} | |
- name: Prepare stuff for pulses | |
run: yarn build-static-viz | |
# test ci | |
# Use custom deps.edn containing "user/databend" alias to include driver sources | |
- name: Run tests | |
run: | | |
mkdir -p /home/runner/.config/clojure | |
cat modules/drivers/databend/.github/workflows/deps.edn | sed -e "s|PWD|$PWD|g" > /home/runner/.config/clojure/deps.edn | |
DRIVERS=databend clojure -X:dev:drivers:drivers-dev:test:user/databend | |
- name: Build databend driver | |
run: | | |
echo "{:deps {metabase/databend {:local/root \"databend\" }}}" > modules/drivers/deps.edn | |
bin/build-driver.sh databend | |
ls -lah resources/modules | |
- name: Archive driver JAR | |
uses: actions/upload-artifact@v2 | |
with: | |
name: databend.metabase-driver.jar | |
path: resources/modules/databend.metabase-driver.jar | |
- name: Report test results | |
uses: mikepenz/action-junit-report@v2.8.1 | |
if: always() | |
with: | |
report_paths: "**/target/junit/*.xml" | |
github_token: ${{ secrets.GITHUB_TOKEN }} |