Skip to content

embabel-chat-store integration #3554

embabel-chat-store integration

embabel-chat-store integration #3554

Workflow file for this run

# This workflow will build a Java / Kotlin project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build
on:
push:
pull_request:
types: [ opened, synchronize, reopened ]
jobs:
# Detect if docs changed - runs first, in parallel with nothing
detect-changes:
runs-on: ubuntu-latest
outputs:
docs-changed: ${{ steps.filter.outputs.docs }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
docs:
- 'embabel-agent-docs/**/*.adoc'
build:
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository)
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Configure Testcontainers (Windows)
if: matrix.os == 'windows-latest'
run: |
echo "testcontainers.reuse.enable=true" > $env:USERPROFILE\.testcontainers.properties
- name: Build and test
env:
SKIP_TESTCONTAINER_TESTS: true # Do not run TestContainer Tests in Windows Matrix Build.
run: mvn -U -B test verify
- name: Linux-specific setup and SonarCloud analysis
if: matrix.os == 'ubuntu-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
# Configure Testcontainers for Linux
mkdir -p /home/runner
echo "testcontainers.reuse.enable=true" > /home/runner/.testcontainers.properties
# Run SonarCloud analysis
mvn -P jacoco-code-coverage -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=embabel_embabel-agent
build-fork: #for public forks
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- name: Build and test
run: |
# Configure Testcontainers for Linux
mkdir -p /home/runner
echo "testcontainers.reuse.enable=true" > /home/runner/.testcontainers.properties
# Build without Sonar Cloud
mvn -U -B test verify
# Trigger docs workflow if .adoc files changed (only on main branch push)
trigger-docs:
needs: [detect-changes, build]
runs-on: ubuntu-latest
if: |
github.event_name == 'push' &&
github.ref == 'refs/heads/main' &&
needs.detect-changes.outputs.docs-changed == 'true'
steps:
- name: Trigger Publish Docs workflow
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT_TOKEN }}
repository: ${{ github.repository }}
event-type: publish-docs