build.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. # This workflow will build a Java project with Maven
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
  3. name: Java CI with Maven
  4. on:
  5. [push]
  6. jobs:
  7. build:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v2
  11. - name: Set up JDK 14
  12. uses: actions/setup-java@v1
  13. with:
  14. java-version: 14
  15. - name: Restore Maven Cache
  16. uses: actions/cache@v1
  17. with:
  18. path: ~/.m2/repository
  19. key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
  20. restore-keys: |
  21. ${{ runner.os }}-maven-
  22. - name: Build with Maven
  23. run: mvn -B package --file main/pom.xml -Pcoverage,release
  24. - name: Run codacy-coverage-reporter
  25. uses: codacy/codacy-coverage-reporter-action@master
  26. with:
  27. project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}
  28. # - name: Uploads the build artifacts
  29. # uses: actions/upload-artifact@v1
  30. # with:
  31. # name: charger-${{matrix.os}}.zip
  32. # path: target/charger.zip