Dependency updates #364
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
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build and Test | |
on: | |
push: | |
branches: [ '*' ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout completely | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2 | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'zulu' | |
cache: maven | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.2 | |
- name: Build with Maven | |
env: | |
NVD_API_KEY: ${{ secrets.NVD_API_KEY }} | |
run: mvn -B clean install site --file pom.xml | |
- uses: codecov/codecov-action@v4 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: target/site/jacoco/jacoco.xml | |
flags: unittests | |
fail_ci_if_error: true | |
verbose: true | |
- name: Tidy up old package versions | |
uses: actions/delete-package-versions@v5 | |
with: | |
package-name: 'uk.co.spudsoft.params4j' | |
package-type: maven | |
min-versions-to-keep: 10 | |
delete-only-pre-release-versions: "true" | |
num-old-versions-to-delete: 0 | |
- name: Clean up settings.xml | |
run: | | |
rm "${HOME}/.m2/settings.xml" | |