Build node module #1
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: Build node module | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths: [ .github/workflows/node.yml, node/** ] | |
pull_request: | |
branches: [ master ] | |
paths: [ .github/workflows/node.yml, node/** ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Cache Maven dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven | |
- name: Run compile | |
run: mvn -f node/pom.xml clean compile --no-transfer-progress | |
- name: Run tests | |
run: mvn -f node/pom.xml clean test | |
- name: Run Checkstyle | |
run: mvn -f node/pom.xml clean checkstyle:check | |
- name: Package the application | |
run: mvn -f node/pom.xml package |