* Use bun in package.json * Update workflows * Update more workflows * Kick ci * Fix yaml * Fix type errors * Compat with snyk * Fix jest resolutions * Add another esm package * Fix aliases and next js missing deps * Update next js embed tests * Try fix embed test config * Fix * Fix requires in e2e support * Use bun not yarn in embed bin * Revert config changes * Use bun in more scripts and use prepare-release action * Replace more yarn usages * Remove overrides from bunfig move to package json * Revert e2e support changes * Add back comment * [ci skip] comment typo * Update bun lock * Update to reference bun * Update to reference bun * Update license disclaimer * Tidy tests * Update to use bun in workflows * Change aliases * Update codemirrort selector * Tidy license generation * Remove .only * Fix yarn references * Checkout .github for release scripts * Update lockfile * Re-add package * update release bunlock * fix checkout check --------- Co-authored-by: Ryan Laurie <iethree@gmail.com>
64 lines
2.5 KiB
YAML
64 lines
2.5 KiB
YAML
name: Test database driver
|
|
description: Test database driver
|
|
inputs:
|
|
junit-name:
|
|
required: true
|
|
default: "driver"
|
|
test-args:
|
|
required: false
|
|
build-static-viz:
|
|
required: true
|
|
default: false
|
|
logs-artifact-suffix:
|
|
required: false
|
|
description: Suffix to append to the test logs artifact name to avoid conflicts in matrix jobs
|
|
edition:
|
|
required: false
|
|
default: 'ee'
|
|
description: Edition to test (oss or ee)
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Prepare back-end environment
|
|
uses: ./.github/actions/prepare-backend
|
|
- name: Prepare front-end environment
|
|
if: ${{ inputs.build-static-viz == 'true' }}
|
|
uses: ./.github/actions/prepare-frontend
|
|
- name: Build static viz frontend
|
|
if: ${{ inputs.build-static-viz == 'true' }}
|
|
run: bun run build-static-viz
|
|
shell: bash
|
|
env:
|
|
MB_EDITION: ee
|
|
- name: Test database driver
|
|
run: clojure -X:dev:ci:${{ inputs.edition }}:${{ inputs.edition }}-dev:drivers:drivers-dev:test ${{ inputs.test-args }}
|
|
shell: bash
|
|
id: run-test
|
|
# Trunk Quarantine controls the final state of the run in the CI!
|
|
# Even if this step fails we let it pass, and then `trunk-io/analytics-uploader` determines
|
|
# whether to fail or to pass the whole job, based on the quarantine list.
|
|
continue-on-error: true
|
|
- name: Publish Test Report (JUnit)
|
|
uses: dorny/test-reporter@v1
|
|
# As per the documentation: https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#steps-context
|
|
# test.outcome gives us access to the result before `continue-on-error` overrides it and sets it to 'success'.
|
|
# We want test reports even if the test step gets cancelled (e.g. times out), hence we match anything that is not a 'success'.
|
|
if: ${{ steps.run-test.outcome != 'success' }}
|
|
with:
|
|
path: "target/junit/**/*_test.xml"
|
|
name: JUnit Test Report ${{ inputs.junit-name }}
|
|
reporter: java-junit
|
|
list-suites: failed
|
|
list-tests: failed
|
|
fail-on-error: false
|
|
- name: Upload Logs on Failure
|
|
if: always() && steps.run-test.outcome != 'success'
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ format('test-logs-{0}{1}', github.job, inputs.logs-artifact-suffix && format('-{0}', inputs.logs-artifact-suffix) || '') }}
|
|
path: logs/test-log.json
|
|
retention-days: 1
|
|
# Failing to upload the artifact should never affect the outcome of the whole test run.
|
|
continue-on-error: true
|