Skip to content

feat: parallel query #5926

feat: parallel query

feat: parallel query #5926

Workflow file for this run

name: Java CI - test
on:
workflow_dispatch:
pull_request:
branches:
- main
# Skip if only Python bindings change
paths-ignore:
- 'bindings/python/**'
push:
branches:
- main
# Skip if only Python bindings change
paths-ignore:
- 'bindings/python/**'
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Ensure SHA pinned actions
uses: zgosalvez/github-actions-ensure-sha-pinned-actions@d5d20e15f2736816ee0e001ba8b24b54d9ffcff4 # v5.0.0
- name: Run pre-commit
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13.0"
cache: "pip"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
build-and-package:
runs-on: ubuntu-latest
needs: setup
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Get project version
id: get-version
run: echo "version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_OUTPUT
- name: Build and package with Maven Docker profile
run: ./mvnw clean install -Pdocker -DskipTests --batch-mode --errors --show-version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Save docker image
run: docker save arcadedata/arcadedb:latest > /tmp/arcadedb-image.tar
- name: Cache Docker image
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Cache Maven artifacts
uses: actions/cache/save@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
unit-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Run Unit Tests with Coverage
# package phase runs surefire (test) and JaCoCo report (prepare-package) without reaching integration-test phase
run: ./mvnw verify -Pcoverage --batch-mode --errors --fail-never --show-version -pl !e2e,!load-tests -DexcludedGroups=slow,benchmark -Dsurefire.includes=**/*Test.java,**/*Suite.java
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unit Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Unit Tests Report
path: "**/surefire-reports/TEST*.xml"
list-tests: "failed"
list-suites: "failed"
reporter: java-junit
- name: Upload unit test coverage reports
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: unit-coverage-reports
path: |
**/jacoco*.xml
retention-days: 1
slow-unit-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Run Slow Unit Tests with Coverage
run: ./mvnw package -Pcoverage --batch-mode --errors --fail-never --show-version -pl engine -Dgroups=slow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unit Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Unit Tests Report
path: "**/surefire-reports/TEST*.xml"
list-tests: "failed"
list-suites: "failed"
reporter: java-junit
- name: Upload unit test coverage reports
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: slow-unit-coverage-reports
path: |
**/jacoco*.xml
retention-days: 1
benchmark-unit-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Run Benchmark Unit Tests with Coverage
run: ./mvnw verify -Pcoverage --batch-mode --errors --fail-never --show-version -Dgroups=benchmark -Dsurefire.includes=**/*Benchmark.java
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Unit Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Unit Tests Report
path: "**/surefire-reports/TEST*.xml"
list-tests: "failed"
list-suites: "failed"
reporter: java-junit
- name: Upload Benchmark unit test coverage reports
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: benchmark-unit-coverage-reports
path: |
**/jacoco*.xml
retention-days: 1
integration-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Run Integration Tests with Coverage
run: ./mvnw verify -DskipTests -Pintegration -Pcoverage --batch-mode --errors --fail-never --show-version -pl !e2e,!load-tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: IT Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: IT Tests Report
path: "**/failsafe-reports/TEST*.xml"
list-tests: "failed"
list-suites: "failed"
reporter: java-junit
- name: Upload integration test coverage reports
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: integration-coverage-reports
path: |
**/jacoco*.xml
retention-days: 1
builder-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Build packages for Builder Tests
run: ./mvnw clean package -DskipTests --batch-mode --errors --show-version
- name: Run Builder Tests
working-directory: package
run: ./test-builder-local.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
java-e2e-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Restore Docker image
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Load Docker image
run: docker load < /tmp/arcadedb-image.tar
- name: E2E Tests
run: ./mvnw verify -pl e2e
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCADEDB_DOCKER_IMAGE: ${{ needs.build-and-package.outputs.image-tag }}
- name: E2E Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Java E2E Tests Report
path: "e2e/target/surefire-reports/TEST*.xml"
list-suites: "failed"
list-tests: "failed"
reporter: java-junit
java-load-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up JDK 21
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
distribution: "temurin"
java-version: 21
cache: "maven"
- name: Restore Maven artifacts
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: ~/.m2/repository
key: maven-repo-${{ github.run_id }}-${{ github.run_attempt }}
- name: Restore Docker image
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Load Docker image
run: docker load < /tmp/arcadedb-image.tar
- name: E2E Perf Tests
run: ./mvnw verify -Pintegration -pl load-tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCADEDB_DOCKER_IMAGE: ${{ needs.build-and-package.outputs.image-tag }}
- name: E2E Perf Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Java Load Tests Report
path: "load-tests/target/failsafe-reports/TEST*.xml"
list-suites: "failed"
list-tests: "failed"
reporter: java-junit
js-e2e-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "e2e-js/package-lock.json"
- name: Restore Docker image
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Load Docker image
run: docker load < /tmp/arcadedb-image.tar
- name: E2E Node.js Tests
working-directory: e2e-js
run: |
npm install
npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCADEDB_DOCKER_IMAGE: ${{ needs.build-and-package.outputs.image-tag }}
studio-e2e-tests:
runs-on: ubuntu-latest
needs: build-and-package
permissions:
contents: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Node
uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
with:
node-version: "22"
cache: "npm"
cache-dependency-path: "e2e-studio/package-lock.json"
- name: Restore Docker image
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Load Docker image
run: docker load < /tmp/arcadedb-image.tar
- name: Install Playwright Browsers
working-directory: e2e-studio
run: |
npm install
npm run install-browsers
- name: E2E Studio Tests
working-directory: e2e-studio
run: |
npm run test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCADEDB_DOCKER_IMAGE: ${{ needs.build-and-package.outputs.image-tag }}
- name: Studio E2E Tests Reporter
uses: dorny/test-reporter@b082adf0eced0765477756c2a610396589b8c637 # v2.5.0
if: success() || failure()
with:
name: Studio E2E Tests Report
path: "e2e-studio/reports/playwright-junit.xml"
list-suites: "failed"
list-tests: "failed"
reporter: java-junit
- name: Upload Studio E2E test artifacts
if: success() || failure()
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: studio-e2e-artifacts
path: |
e2e-studio/test-results/
e2e-studio/playwright-report/
retention-days: 7
python-e2e-tests:
runs-on: ubuntu-latest
needs: build-and-package
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13.0"
cache: "pip"
cache-dependency-path: "e2e-python/requirements*.txt"
- name: Setup UV package manager
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version
- name: Restore Docker image
uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
with:
path: /tmp/arcadedb-image.tar
key: docker-image-${{ github.run_id }}-${{ github.run_attempt }}
- name: Load Docker image
run: docker load < /tmp/arcadedb-image.tar
- name: E2E Python Tests
working-directory: e2e-python
run: |
uv pip install --system -e .
uv pip install --system pytest
pytest tests/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ARCADEDB_DOCKER_IMAGE: ${{ needs.build-and-package.outputs.image-tag }}
coverage-report:
runs-on: ubuntu-latest
needs: [ unit-tests, integration-tests, slow-unit-tests, benchmark-unit-tests ]
if: success() || failure()
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Download unit test coverage reports
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
continue-on-error: true
with:
name: unit-coverage-reports
path: unit-coverage
- name: Download slow unit test coverage reports
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
continue-on-error: true
with:
name: slow-unit-coverage-reports
path: slow-unit-coverage
- name: Download benchmark unit test coverage reports
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
continue-on-error: true
with:
name: benchmark-unit-coverage-reports
path: benchmark-unit-coverage
- name: Download integration test coverage reports
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
continue-on-error: true
with:
name: integration-coverage-reports
path: integration-coverage
- name: Get coverage files
id: coverage-files-generator
if: success() || failure()
run: echo "COVERAGE_FILES=$(find . -path **/jacoco*.xml -printf '%p,')" >> "$GITHUB_OUTPUT"
- name: Codacy coverage reporter
uses: codacy/codacy-coverage-reporter-action@89d6c85cfafaec52c72b6c5e8b2878d33104c699 # v1.3.0
if: success() || failure()
with:
language: java
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
coverage-reports: ${{ steps.coverage-files-generator.outputs.COVERAGE_FILES }}
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5.5.2
if: success() || failure()
with:
fail_ci_if_error: false
disable_search: true
files: ${{ steps.coverage-files-generator.outputs.COVERAGE_FILES }}
token: ${{ secrets.CODECOV_TOKEN }}
slug: ArcadeData/arcadedb
verbose: true