fix: builder errors due to missing configurations #22
Workflow file for this run
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: Checkstyle and Tests | |
on: | |
pull_request: | |
branches: | |
- 'main' | |
types: [opened, synchronize, reopened] | |
jobs: | |
build-and-test: | |
name: Build, Checkstyle, and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 8 | |
distribution: 'semeru' | |
- name: Get java-version | |
run: | | |
BUILD_VERSION=$( mvn help:evaluate -Dexpression=project.version -q -DforceStdout ) | |
echo "VERSION=$BUILD_VERSION" >> $GITHUB_ENV | |
- name: Build and Test | |
run: mvn -B clean compile verify checkstyle:check | |
- name: Upload test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: test-results | |
path: target/surefire-reports | |
verify-commits: | |
name: Verify Commits | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 | |
- name: Verify Signed-off-by | |
run: | | |
for commit in $(git rev-list --no-merges HEAD^..HEAD); do | |
if ! git log -1 --format=%B "$commit" | grep -q "^Signed-off-by: "; then | |
echo "Commit $commit is missing Signed-off-by line." | |
exit 1 | |
fi | |
done |