Convert GitHub Actions workflow to Maven #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: Maven Test Workflow | |
on: | |
push: | |
branches: | |
- [ "master" ] | |
pull_request: | |
branches: | |
- [ "master" ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code from the repository | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
# Set up Java with Maven | |
- name: Set up Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' # Use Eclipse Temurin as the JDK distribution | |
java-version: 'latest' # Use the latest stable Java version | |
cache: 'maven' # Enable caching for Maven dependencies | |
# Build and run tests using Maven | |
- name: Build and run tests | |
run: mvn test |