Merge pull request #1087 from games647/dependabot/maven/production-de… #708
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
# Automatically build, run unit and integration tests to detect errors early (CI provided by GitHub) | |
# including making pull requests review easier | |
# Human-readable name in the actions tab | |
name: Maven Build | |
# Build on every pull request regardless of the branch | |
# Wiki: https://help.github.com/en/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# job id | |
build_and_test: | |
# Environment image - always use the newest OS | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
# Run steps | |
steps: | |
# Pull changes | |
- uses: actions/checkout@v3 | |
# Setup Java | |
- name: Set up JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version-file: '.java-version' | |
cache: 'maven' | |
# Build and test (included in package) | |
- name: Build with Maven and test | |
# Run non-interactive, package (with compile+test), | |
# ignore snapshot updates, because they are likely to have breaking changes, enforce checksums | |
run: mvn test --batch-mode --threads 2.0C --no-snapshot-updates --strict-checksums --file pom.xml | |
- name: Update dependency graph | |
if: ${{ github.event_name == 'push' }} | |
uses: advanced-security/[email protected] |