1
0

build.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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: build
  4. on:
  5. push:
  6. branches: [ master ]
  7. paths-ignore: [ '**/*.md' ]
  8. pull_request:
  9. branches: [ master ]
  10. paths-ignore: [ '**/*.md' ]
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. jdk: [7, 8, 11]
  17. steps:
  18. - uses: actions/checkout@v2
  19. - name: Set up JDK
  20. uses: actions/setup-java@v1
  21. with:
  22. java-version: ${{ matrix.jdk }}
  23. - name: Cache Maven packages
  24. uses: actions/cache@v1
  25. with:
  26. path: ~/.m2
  27. key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
  28. restore-keys: ${{ runner.os }}-m2
  29. - name: Build SDK with JDK 7
  30. if: matrix.jdk == '7'
  31. run: mvn clean compile -pl apollo-client,apollo-mockserver,apollo-openapi -am -Dmaven.gitcommitid.skip=true
  32. - name: JDK 8
  33. if: matrix.jdk == '8'
  34. run: mvn -B clean package -P travis jacoco:report -Dmaven.gitcommitid.skip=true
  35. - name: JDK 11
  36. if: matrix.jdk == '11'
  37. run: mvn clean compile -Dmaven.gitcommitid.skip=true
  38. - name: Upload coverage to Codecov
  39. if: matrix.jdk == '8'
  40. uses: codecov/codecov-action@v1
  41. with:
  42. file: ${{ github.workspace }}/apollo-*/target/site/jacoco/jacoco.xml