Clean up CI

This commit is contained in:
games647
2021-02-08 11:50:58 +01:00
parent 465519eece
commit 25356db175

View File

@ -1,4 +1,6 @@
# Human readable name # Automatically build, run unit and integration tests to detect errors early (CI provided by GitHub)
# Human readable name in the actions tab
name: Java CI name: Java CI
# Build on every push and pull request regardless of the branch # Build on every push and pull request regardless of the branch
@ -17,26 +19,30 @@ jobs:
# Run steps # Run steps
steps: steps:
# Pull changes # Pull changes
- uses: actions/checkout@v2.3.4 - uses: actions/checkout@v2.3
# Cache artifacts - however this has the downside that we don't get notified of # Cache artifacts - however this has the downside that we don't get notified of
# artifact resolution failures like invalid repository # artifact resolution failures like invalid repository
# Nevertheless the repositories should be more stable and it makes no sense to pull # Nevertheless the repositories should be more stable and it makes no sense to pull
# a same version every time # a same version every time
# A dry run would make more sense # A dry run would make more sense
- uses: actions/cache@v2.1.3 - uses: actions/cache@v2.1
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: | restore-keys: |
${{ runner.os }}-maven- ${{ runner.os }}-maven-
# Setup Java # Setup Java
- name: Set up JDK - name: Set up JDK
uses: actions/setup-java@v1.4.3 uses: actions/setup-java@v1.4.3
with: with:
# Use Java 8, because it's minimum required version # Use Java 11, because it's minimum required version
java-version: 8 java-version: 11
# Build and test (included in package) # Build and test (included in package)
- name: Build with Maven and test - name: Build with Maven and test
# Run non-interactive, package (with compile+test), # Run non-interactive, package (with compile+test),
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate posssible errors in depdendencies # ignore snapshot updates, because they are likely to have breaking changes, enforce checksums to validate
run: mvn --batch-mode package --no-snapshot-updates --strict-checksums --file pom.xml # possible errors in dependencies
run: mvn package test --batch-mode --no-snapshot-updates --strict-checksums --file pom.xml