Skip to content

Commit

Permalink
Added github workflow files
Browse files Browse the repository at this point in the history
  • Loading branch information
cozej4 committed Oct 18, 2021
1 parent 4f22cf7 commit 1a669d5
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# This workflow will build a run Jacoco tests with Maven and send the coverage report to coveralls
# For more information see: https://github.com/trautonen/coveralls-maven-plugin

name: Generate Coverage Report and Send it to coveralls

on:
push:
branches: [ development ]
pull_request:
branches: [ development ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml
- name: Set branch name and PR number
id: refs
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: Coveralls Maven plugin
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 coveralls:report \
--no-transfer-progress \
-D repoToken=${{ secrets.COVERALLS_TOKEN }}
24 changes: 24 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
push:
branches: [ development ]
pull_request:
branches: [ development ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Build with Maven
run: mvn -B package --file pom.xml

0 comments on commit 1a669d5

Please sign in to comment.