Skip to content

Commit

Permalink
update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin7-1 committed Oct 30, 2024
1 parent cf48adc commit 58e8a99
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 17 deletions.
25 changes: 17 additions & 8 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ jobs:
- 21
include:
- java_version: '17'
maven_opts: ''
mvn_opts: ''
- java_version: '21'
maven_opts: ''
mvn_opts: ''
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -54,17 +54,26 @@ jobs:
cache: 'maven'
- name: Compile and test with JDK ${{ matrix.java_version }}
run: |
mvn -B -U -T4C test javadoc:aggregate \
-Dgib.disable=false -Dgib.referenceBranch=__branch_before \
${{ matrix.maven_opts }}
mvn -B -U -T8C test javadoc:aggregate \
${{ matrix.mvn_opts }}
- name: Integration test with JDK ${{ matrix.java_version }}
if: ${{ github.repository == 'langchain4j/langchain4j-community' }}
## allow builds to run only:
## - on the main branch when it is not a pull request,
## - for pull requests from the same repository
## - when triggered manually
if: (github.event_name == 'pull_request' && github.head_repo.full_name == github.repository) || (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'
run: |
mvn -B -U verify \
-Dtinylog.writer.level=info \
-Dgib.disable=false -Dgib.referenceBranch=__branch_before \
${{ matrix.maven_opts }}
${{ matrix.mvn_opts }}
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step fails
with:
report_paths: '**/target/*-reports/TEST-*.xml'
annotate_only: true

# For checking some compliance things (require a recent JDK due to plugins so in a separate step)
compliance:
Expand Down
25 changes: 17 additions & 8 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- 21
include:
- java_version: '17'
maven_opts: ''
mvn_opts: ''
- java_version: '21'
maven_opts: ''
mvn_opts: ''
max-parallel: 1
runs-on: ubuntu-latest
steps:
Expand All @@ -33,17 +33,26 @@ jobs:
- name: Build with JDK ${{ matrix.java_version }}
run: |
## compile and verify javadocs on ALL modules
mvn -B -U -T4C test javadoc:aggregate
mvn -B -U -T8C test javadoc:aggregate \
--fail-at-end \
${{ matrix.mvn_opts }}
## run tests for some modules
mvn -B -U --fail-at-end \
mvn -B -U verify \
--fail-at-end \
-Dmaven.test.failure.ignore=true \
-Dtinylog.writer.level=info \
${{ matrix.maven_opts }} verify
${{ matrix.mvn_opts }}
- name: Upload Test Reports
if: always()
if: always() # always run even if the previous step failed or was cancelled
uses: actions/upload-artifact@v3
with:
name: Test-Reports-${{ matrix.java-version }}
path: '**/target/surefire-reports/*'
path: '**/target/*-reports/*'

- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: always() # always run even if the previous step failed or was cancelled
with:
report_paths: '**/target/*-reports/TEST-*.xml'
annotate_only: true
13 changes: 12 additions & 1 deletion .github/workflows/snapshot_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,15 @@ jobs:
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
# Notes:
# - tests already run in a separate action (main)
run: mvn -B -U --fail-at-end -DskipTests -DskipITs clean deploy
run: |
mvn -B -U --fail-at-end \
-DskipTests -DskipITs \
-pl !langchain4j-core,!langchain4j-parent \
clean deploy
- name: Publish Test Report
uses: mikepenz/action-junit-report@v4
if: success() || failure() # always run even if the previous step fails
with:
report_paths: '**/target/*-reports/TEST-*.xml'
annotate_only: true

0 comments on commit 58e8a99

Please sign in to comment.