Fix error uploading offset datetime #368
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: Check | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
env: | |
METABASE_VERSION: v0.50.6 | |
jobs: | |
check-local-current-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Metabase Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: metabase/metabase | |
ref: ${{ env.METABASE_VERSION }} | |
- name: Remove incompatible tests | |
# dataset-definition-test tests test data definition, | |
# and is currently failing for an unknown reason. | |
# metabase.query-processor.middleware.permissions-test does not look like it is related to the driver at all, | |
# but it is failing on the CI only. | |
# | |
# FIXME: metabase.models.card-test is failing as of 0.50.0; | |
# it is unrelated to the driver, likely will be fixed in the future Metabase versions. | |
# FIXME: metabase.models.dashboard-card-test disabled because it imports from metabase.models.card-test | |
run: | | |
echo "(ns metabase.test.data.dataset-definition-test)" > test/metabase/test/data/dataset_definition_test.clj | |
echo "(ns metabase.query-processor.middleware.permissions-test)" > test/metabase/query_processor/middleware/permissions_test.clj | |
echo "(ns metabase.models.card-test)" > test/metabase/models/card_test.clj | |
echo "(ns metabase.models.dashboard-card-test)" > test/metabase/models/dashboard_card_test.clj | |
- name: Checkout Driver Repo | |
uses: actions/checkout@v4 | |
with: | |
path: modules/drivers/clickhouse | |
- name: Prepare JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Add ClickHouse TLS instance to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 server.clickhouseconnect.test" | sudo tee -a /etc/hosts | |
- name: Start ClickHouse in Docker | |
uses: hoverkraft-tech/[email protected] | |
with: | |
compose-file: "modules/drivers/clickhouse/docker-compose.yml" | |
down-flags: "--volumes" | |
services: | | |
clickhouse | |
clickhouse_tls | |
clickhouse_older_version | |
clickhouse_cluster_node1 | |
clickhouse_cluster_node2 | |
nginx | |
- 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@v4 | |
with: | |
node-version: "20" | |
cache: "yarn" | |
# - name: Get M2 cache | |
# uses: actions/cache@v4 | |
# with: | |
# path: | | |
# ~/.m2 | |
# ~/.gitlibs | |
# key: ${{ runner.os }}-clickhouse-${{ hashFiles('**/deps.edn') }} | |
- name: Prepare stuff for pulses | |
run: yarn build-static-viz | |
# Use custom deps.edn containing "user/clickhouse" alias to include driver sources | |
- name: Prepare deps.edn | |
run: | | |
mkdir -p /home/runner/.config/clojure | |
cat modules/drivers/clickhouse/.github/deps.edn | sed -e "s|PWD|$PWD|g" > /home/runner/.config/clojure/deps.edn | |
- name: Run all tests with the latest ClickHouse version | |
env: | |
DRIVERS: clickhouse | |
run: | | |
clojure -X:ci:dev:ee:ee-dev:drivers:drivers-dev:test:user/clickhouse | |
check-local-older-version: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Metabase Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: metabase/metabase | |
ref: ${{ env.METABASE_VERSION }} | |
- name: Checkout Driver Repo | |
uses: actions/checkout@v4 | |
with: | |
path: modules/drivers/clickhouse | |
- name: Prepare JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: "temurin" | |
java-version: "17" | |
- name: Add ClickHouse TLS instance to /etc/hosts | |
run: | | |
sudo echo "127.0.0.1 server.clickhouseconnect.test" | sudo tee -a /etc/hosts | |
- name: Start ClickHouse in Docker | |
uses: hoverkraft-tech/[email protected] | |
with: | |
compose-file: "modules/drivers/clickhouse/docker-compose.yml" | |
down-flags: "--volumes" | |
# FIXME: We only need to run a few specific tests with `clickhouse_older_version` | |
# Currently, we run all tests with it, which is unnecessary. | |
services: | | |
clickhouse | |
clickhouse_tls | |
clickhouse_older_version | |
clickhouse_cluster_node1 | |
clickhouse_cluster_node2 | |
nginx | |
- 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: Get M2 cache | |
# uses: actions/cache@v4 | |
# with: | |
# path: | | |
# ~/.m2 | |
# ~/.gitlibs | |
# key: ${{ runner.os }}-clickhouse-${{ hashFiles('**/deps.edn') }} | |
# Use custom deps.edn containing "user/clickhouse" alias to include driver sources | |
- name: Prepare deps.edn | |
run: | | |
mkdir -p /home/runner/.config/clojure | |
cat modules/drivers/clickhouse/.github/deps.edn | sed -e "s|PWD|$PWD|g" > /home/runner/.config/clojure/deps.edn | |
- name: Run ClickHouse driver tests with 23.3 | |
env: | |
DRIVERS: clickhouse | |
MB_CLICKHOUSE_TEST_PORT: 8124 | |
run: | | |
clojure -X:ci:dev:ee:ee-dev:drivers:drivers-dev:test:user/clickhouse :only metabase.driver.clickhouse-test | |
build-jar: | |
runs-on: ubuntu-latest | |
needs: [ 'check-local-current-version', 'check-local-older-version' ] | |
steps: | |
- name: Checkout Metabase Repo | |
uses: actions/checkout@v4 | |
with: | |
repository: metabase/metabase | |
ref: ${{ env.METABASE_VERSION }} | |
- name: Checkout Driver Repo | |
uses: actions/checkout@v4 | |
with: | |
path: modules/drivers/clickhouse | |
- 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: Build ClickHouse driver | |
run: | | |
echo "{:deps {metabase/clickhouse {:local/root \"clickhouse\" }}}" > modules/drivers/deps.edn | |
bin/build-driver.sh clickhouse | |
ls -lah resources/modules | |
- name: Archive driver JAR | |
uses: actions/upload-artifact@v4 | |
with: | |
name: clickhouse.metabase-driver.jar | |
path: resources/modules/clickhouse.metabase-driver.jar |