Skip to content

Commit

Permalink
Fix support for Coveralls and make it optional
Browse files Browse the repository at this point in the history
  • Loading branch information
ibacher committed Dec 17, 2020
1 parent 0677be1 commit e183b75
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,23 @@ jobs:
run: mvn clean install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --file pom.xml
- name: Build with Maven
run: mvn test --batch-mode --file pom.xml
# this is necessary to populate the environment variables for Coveralls properly
- name: Set branch name and PR number
id: refs
continue-on-error: true
env:
BRANCH_NAME_OR_REF: ${{ github.head_ref || github.ref }}
run: |
echo "::set-output name=branch_name::${BRANCH_NAME_OR_REF#refs/heads/}"
echo "::set-output name=pr_number::$(jq --raw-output .pull_request.number "$GITHUB_EVENT_PATH")"
- name: Update coverage
run: mvn jacoco:report coveralls:report
continue-on-error: true
if: ${{ steps.refs.outcome == 'success' }}
env:
CI_NAME: Github
CI_BUILD_NUMBER: ${{ github.run_id }}
CI_BUILD_URL: https://github.com/${{ github.repository }}/commit/${{ github.event.after }}/checks
CI_BRANCH: ${{ steps.refs.outputs.branch_name }}
CI_PULL_REQUEST: ${{ steps.refs.outputs.pr_number }}
run: mvn jacoco:report coveralls:report --batch-mode --file pom.xml --no-transfer-progress -DrepoToken=${{ secrets.COVERALLS_TOKEN }}

0 comments on commit e183b75

Please sign in to comment.