Inventory WebHook #42
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: Java CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Unit Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Build with Maven | |
run: mvn clean install | |
- name: Run Unit Tests | |
run: mvn test | |
checkstyle: | |
name: Checkstyle | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: '21' | |
- name: Build with Maven | |
run: mvn clean install | |
- name: Run Checkstyle | |
run: mvn checkstyle:check | |
- name: Archive Checkstyle Reports | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: checkstyle-reports | |
path: target/checkstyle-result.xml |