update CI config for pull requests

see https://securitylab.github.com/research/github-actions-preventing-pwn-requests/
This commit is contained in:
Sebastian Stenzel
2021-10-08 15:30:28 +02:00
parent 6c6f6baf12
commit 7f833d2567
2 changed files with 32 additions and 7 deletions

26
.github/workflows/pullrequest.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Pull Request
on:
pull_request:
env:
JAVA_VERSION: 17
defaults:
run:
shell: bash
jobs:
test:
name: Compile and Test
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: ${{ env.JAVA_VERSION }}
cache: 'maven'
- name: Build and Test
run: mvn -B clean install jacoco:report -Pcoverage,dependency-check