You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

maven.yml 1.2KB

1234567891011121314151617181920212223242526272829303132333435
  1. # This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
  2. # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
  3. name: Java CI with Maven
  4. on:
  5. push:
  6. branches: [ "main" ]
  7. pull_request:
  8. branches: [ "main" ]
  9. jobs:
  10. build:
  11. name: Test with Java ${{ matrix.jdk }} ${{ matrix.os }}
  12. runs-on: ${{ matrix.os }}
  13. strategy:
  14. fail-fast: false
  15. matrix:
  16. jdk: ['8', '11', '17', '21']
  17. os: [ubuntu-latest, windows-latest]
  18. steps:
  19. - uses: actions/checkout@v4
  20. - name: Set up JDK ${{ matrix.jdk }}
  21. uses: actions/setup-java@v3
  22. with:
  23. java-version: ${{ matrix.jdk }}
  24. distribution: 'temurin'
  25. cache: maven
  26. - name: Build with Maven
  27. run: mvn -B package checkstyle:check spotbugs:check --file pom.xml
  28. # Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
  29. #- name: Update dependency graph
  30. # uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6