From 39b61b5b5d000911aa0468dc0355414b95c5f421 Mon Sep 17 00:00:00 2001 From: Michael Davenport Date: Fri, 7 Feb 2025 14:50:47 -0700 Subject: [PATCH] add tests workflow --- .github/workflows/tests.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..9b748c9 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,34 @@ +name: Tests +on: + pull_request: + branches: + - main + push: + branches: + - main +jobs: + maven-tests: + name: "Run tests with Maven" + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: | + ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/*.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'corretto' + java-version: '21' + + - name: Test with Maven + run: mvn test