Skip to content

fix: ClasspathSkillRepository loads skill failed in multi-module java project #2480

fix: ClasspathSkillRepository loads skill failed in multi-module java project

fix: ClasspathSkillRepository loads skill failed in multi-module java project #2480

Workflow file for this run

# This workflow will build a Java 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: Java CI with Maven
on:
push:
pull_request:
jobs:
license:
name: "Check License"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Check License"
uses: apache/skywalking-eyes@e1a02359b239bd28de3f6d35fdc870250fa513d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Check Dependencies' License"
uses: apache/skywalking-eyes/dependency@e1a02359b239bd28de3f6d35fdc870250fa513d5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
config: .licenserc.yaml
mode: check
module-sync:
name: "Check Module Sync"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check extension modules are synced to agentscope-all and agentscope-bom
run: |
chmod +x .github/scripts/check-shade-and-bom-sync.sh
./.github/scripts/check-shade-and-bom-sync.sh
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, windows-latest ]
include:
- os: ubuntu-latest
repo-cache-path: '~/.m2/repository'
mvnd-cache-path: '~/.mvnd'
- os: windows-latest
repo-cache-path: '~\.m2\repository'
mvnd-cache-path: '~\.mvnd'
env:
MVND_VERSION: '1.0.3'
JAVA_VERSION: '17'
steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ env.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: 'temurin'
cache: 'maven'
- name: Cache Maven repository [${{ runner.os }}]
uses: actions/cache@v4
with:
path: ${{ matrix.repo-cache-path }}
key: maven-${{ runner.os }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
maven-${{ runner.os }}-
- name: Cache mvnd [${{ runner.os }}]
id: cache-mvnd
uses: actions/cache@v4
with:
path: ${{ matrix.mvnd-cache-path }}
key: mvnd-${{ env.MVND_VERSION }}-${{ runner.os }}
- name: Install mvnd [Linux]
if: steps.cache-mvnd.outputs.cache-hit != 'true' && runner.os == 'Linux'
shell: bash
run: |
curl -fsSL https://github.com/apache/maven-mvnd/releases/download/${{ env.MVND_VERSION }}/maven-mvnd-${{ env.MVND_VERSION }}-linux-amd64.tar.gz | tar xz
mkdir -p ~/.mvnd
mv maven-mvnd-${{ env.MVND_VERSION }}-linux-amd64/* ~/.mvnd/
- name: Install mvnd [Windows]
if: steps.cache-mvnd.outputs.cache-hit != 'true' && runner.os == 'Windows'
shell: pwsh
run: |
Invoke-WebRequest `
-Uri "https://github.com/apache/maven-mvnd/releases/download/${{ env.MVND_VERSION }}/maven-mvnd-${{ env.MVND_VERSION }}-windows-amd64.zip" `
-OutFile "mvnd.zip"
mkdir -Path "~\.mvnd" -Force
Expand-Archive -Path "mvnd.zip" -DestinationPath "mvnd" -FORCE
Copy-Item -Path "mvnd\maven-mvnd-${{ env.MVND_VERSION }}-windows-amd64\*" -Destination "~\.mvnd\" -Recurse
Remove-Item -Path "mvnd", "mvnd.zip" -Recurse -Force
- name: Build and Test with Coverage [Linux]
if: runner.os == 'Linux'
run: |
export PATH="$HOME/.mvnd/bin:$PATH"
mvnd -B clean verify
- name: Build and Test with Coverage [Windows]
if: runner.os == 'Windows'
run: |
& "~\.mvnd\bin\mvnd.cmd" -B clean verify
- name: Upload coverage reports to Codecov
if: runner.os == 'Linux'
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
verbose: true