|
16 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
17 | 17 | jobs:
|
18 | 18 | # This workflow contains a single job called "build"
|
19 |
| - unitAndFunctionalTests: |
| 19 | + unitAndFunctionalTests: |
| 20 | + if: github.repository == 'eiffel-community/eiffel-intelligence' |
20 | 21 | # The type of runner that the job will run on
|
21 | 22 | runs-on: ubuntu-18.04
|
22 | 23 | env:
|
|
59 | 60 | mvn test -DskipITs -Dsurefire.rerunFailingTestsCount=2 -Djasypt.encryptor.password=secret -Dspring.config.location=src/functionaltests/resources/application.properties -B
|
60 | 61 |
|
61 | 62 | integrationTests:
|
| 63 | + if: github.repository == 'eiffel-community/eiffel-intelligence' |
62 | 64 | # The type of runner that the job will run on
|
63 | 65 | runs-on: ubuntu-18.04
|
64 | 66 | env:
|
@@ -103,6 +105,7 @@ jobs:
|
103 | 105 | mvn verify -DskipUTs -Djasypt.encryptor.password=integrationtest -Dspring.config.location=src/integrationtests/resources/application.properties -B
|
104 | 106 |
|
105 | 107 | reportCoverage:
|
| 108 | + if: github.repository == 'eiffel-community/eiffel-intelligence' && github.event_name == 'push' |
106 | 109 | # The type of runner that the job will run on
|
107 | 110 | runs-on: ubuntu-18.04
|
108 | 111 | env:
|
@@ -133,11 +136,14 @@ jobs:
|
133 | 136 | tar xf /tmp/apache-maven-3.6.3-bin.tar.gz -C /opt
|
134 | 137 | echo "${M2_HOME}/bin" >> $GITHUB_PATH
|
135 | 138 |
|
136 |
| - # Generating test coverage report and publishing to Codacy |
137 |
| - - name: Run report coverage |
| 139 | + - name: Run cobertura |
138 | 140 | shell: bash
|
139 | 141 | run: |
|
140 |
| - mvn --version |
141 |
| - mvn cobertura:cobertura -Dcobertura.report.format=xml -B |
142 |
| - curl -LSs $(curl -LSs https://api.github.com/repos/codacy/codacy-coverage-reporter/releases/latest | jq -r '.assets | map({content_type, browser_download_url} | select(.content_type | contains("application/octet-stream"))) | .[0].browser_download_url') -o codacy-coverage-reporter-assembly.jar |
143 |
| - java -jar codacy-coverage-reporter-assembly.jar report -l Java -r target/site/cobertura/coverage.xml |
| 142 | + mvn cobertura:cobertura -Dcobertura.report.format=xml -B |
| 143 | + |
| 144 | + # Generating test coverage report and publishing to Codacy |
| 145 | + - name: Run report coverage |
| 146 | + uses: codacy/codacy-coverage-reporter-action@v1 |
| 147 | + with: |
| 148 | + project-token: 571cdd20d4bf435f84b25d806d304792 |
| 149 | + coverage-reports: target/site/cobertura/coverage.xml |
0 commit comments