Add Github Actions workflow for CI #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: '8' | |
distribution: 'adopt' | |
- name: Build with Maven | |
run: mvn clean install | |
- name: Run tests with Maven | |
run: mvn verify | |
- name: Generate code coverage report | |
run: mvn jacoco:report | |
- name: Upload code coverage to Codecov | |
uses: codecov/codecov-action@v2 | |
- name: Set GIT_COMMIT environment variable | |
run: echo "GIT_COMMIT=dummy-value" >> $GITHUB_ENV |