* Internal load-namespaces tool to check for compilation errors * Ignore load-namespaces in module checks * lint load-namespaces * Reject positional args * Test the new utility * Guard against nonexistent root. Make the code more testable.
75 lines
2.5 KiB
YAML
75 lines
2.5 KiB
YAML
name: Build scripts
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'master'
|
|
- 'release-**'
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
files-changed:
|
|
name: Check which files changed
|
|
runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}
|
|
timeout-minutes: 3
|
|
permissions:
|
|
contents: read
|
|
outputs:
|
|
embedder_plugin: ${{ steps.changes.outputs.embedder_plugin }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Test which files changed
|
|
uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
|
|
id: changes
|
|
with:
|
|
token: ${{ github.token }}
|
|
filters: .github/file-paths.yaml
|
|
|
|
test-embedder-plugin:
|
|
needs: files-changed
|
|
if: needs.files-changed.outputs.embedder_plugin == 'true'
|
|
runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}
|
|
timeout-minutes: 20
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Prepare back-end environment
|
|
uses: ./.github/actions/prepare-backend
|
|
- name: Build embedder plugin
|
|
run: ./bin/build-embedder-plugin.sh
|
|
- name: Verify packaged plugin resources
|
|
run: |
|
|
jar tf modules/embedder/target/metabase-embedder-plugin.jar | grep -Fx metabase/embedder/metabase-plugin.yaml
|
|
jar tf modules/embedder/target/metabase-embedder-plugin.jar | grep -Fx metabase/embedder-model-catalog.edn
|
|
jar tf modules/embedder/target/metabase-embedder-plugin.jar | grep -Fx metabase-embedder/snowflake-arctic-embed-xs-d8c86521100d3556476a063fc2342036d45c106f-arm64.zip
|
|
jar tf modules/embedder/target/metabase-embedder-plugin.jar | grep -Fx metabase-embedder/snowflake-arctic-embed-xs-d8c86521100d3556476a063fc2342036d45c106f-avx2.zip
|
|
- name: Run artifact-only plugin smoke test
|
|
env:
|
|
MB_EMBEDDER_ARTIFACT_TEST: "true"
|
|
MB_PLUGINS_DIR: modules/embedder/target
|
|
run: >-
|
|
./bin/test-agent --oss :only
|
|
'[metabase.embeddings.embedder-plugin-artifact-test]'
|
|
|
|
test-build-scripts:
|
|
runs-on: ${{ vars.DEFAULT_RUNNER_KEY }}
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
- name: Prepare back-end environment
|
|
timeout-minutes: 5
|
|
uses: ./.github/actions/prepare-backend
|
|
|
|
- name: Run build and release script tests
|
|
run: clojure -X:dev:drivers:build:build-dev:build-test:ci
|
|
timeout-minutes: 15
|
|
- name: Run Liquibase migrations linter tests
|
|
run: clojure -M:test
|
|
working-directory: bin/lint-migrations-file
|
|
timeout-minutes: 15
|
|
- name: Run load-namespaces tests
|
|
run: clojure -M:test
|
|
working-directory: bin/load-namespaces
|
|
timeout-minutes: 15
|