Thanks to visit codestin.com
Credit goes to github.com

Skip to content

XTDB CI

XTDB CI #4468

Workflow file for this run

name: XTDB CI
run-name: XTDB CI
on:
push:
branches-ignore:
- docs-live
jobs:
gradle-test:
name: Gradle Test
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- name: Pick and set a random system-wide time zone
run: |
TZ_LIST=$(timedatectl list-timezones)
RANDOM_TZ=$(echo "$TZ_LIST" | shuf -n 1)
echo "Randomly selected time zone: $RANDOM_TZ"
# Set system time zone
sudo ln -snf /usr/share/zoneinfo/$RANDOM_TZ /etc/localtime
echo "$RANDOM_TZ" | sudo tee /etc/timezone
sudo dpkg-reconfigure -f noninteractive tzdata
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Test
run: ./gradlew test
timeout-minutes: 15
- name: Publish Test Report
uses: mikepenz/action-junit-report@e08919a3b1fb83a78393dfb775a9c37f17d8eea6 # v6.0.1
if: success() || failure() # always run even if the previous step fails
with:
check_name: JUnit Test Report
report_paths: '**/build/test-results/test/TEST-*.xml'
- name: Post Slack Notification (On Fail)
if: failure() && github.repository == 'xtdb/xtdb' && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2.5.0
with:
status: ${{ job.status }}
notification_title: "*{workflow}* has {status_message}:"
message_format: "{emoji} `gradle-test` job has {status_message} in *{workflow}*"
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
lang-test:
name: Non-JVM language tests
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Build XTDB shadowJar
run: ./gradlew :docker:standalone:shadowJar
- name: XTDB service
uses: hoverkraft-tech/compose-action@3846bcd61da338e9eaaf83e7ed0234a12b099b72 # v2.4.1
with:
services: "xtdb"
cwd: "lang"
up-flags: "--wait"
- name: Dump XTDB logs on startup failure
if: failure()
working-directory: "lang"
run: docker compose logs xtdb
- name: JS test
working-directory: "lang"
run: |
docker compose run js
- name: Python test
working-directory: "lang"
run: |
docker compose run python
- name: Elixir test
working-directory: "lang"
run: |
docker compose run elixir
- name: Dump all logs on test failure
if: failure()
working-directory: "lang"
run: docker compose logs
- name: Post Slack Notification (On Fail)
if: failure() && github.repository == 'xtdb/xtdb' && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2.5.0
with:
status: ${{ job.status }}
notification_title: "*{workflow}* has {status_message}:"
message_format: "{emoji} `lang-test` job has {status_message} in *{workflow}*"
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
integration-test:
name: Integration Test
runs-on: ubuntu-latest
permissions:
contents: read
checks: write
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: Integration Test
run: ./gradlew integration-test
timeout-minutes: 15
- name: Publish Test Report
uses: mikepenz/action-junit-report@e08919a3b1fb83a78393dfb775a9c37f17d8eea6 # v6.0.1
if: success() || failure() # always run even if the previous step fails
with:
check_name: JUnit Integration Test Report
report_paths: '**/build/test-results/integration-test/TEST-*.xml'
- name: Post Slack Notification (On Fail)
if: failure() && github.repository == 'xtdb/xtdb' && github.ref == 'refs/heads/main'
uses: ravsamhq/notify-slack-action@be814b201e233b2dc673608aa46e5447c8ab13f2 # v2.5.0
with:
status: ${{ job.status }}
notification_title: "*{workflow}* has {status_message}:"
message_format: "{emoji} `integration-test` job has {status_message} in *{workflow}*"
notify_when: "failure"
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
slt-1:
name: SLT 1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: SLT 1
run: ./gradlew slt-test
timeout-minutes: 20
slt-2:
name: SLT 2
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
- name: Set up JDK 21
uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@4d9f0ba0025fe599b4ebab900eb7f3a1d93ef4c2 # v5.0.0
- name: SLT 2
run: ./gradlew slt-test-2
timeout-minutes: 40
property-test:
uses: ./.github/workflows/property-test.yml
secrets: inherit
with:
iteration_count: "100"
simulation_iteration_count: "100"
permissions:
contents: read
checks: write