Skip to content

Commit

Permalink
Try #7 to run tests on github workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidOut03 committed May 7, 2024
1 parent 8ff943b commit 0ac14a2
Showing 1 changed file with 16 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
name: Java CI with Maven

on:
push:
branches:
- main
pull_request:
branches:
- main

name: tests
on: push
jobs:
build:

run_tests:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v2
- name: Checkout the repository
uses: actions/checkout@v2
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: '1.8'

- name: Build with Maven
run: mvn -B clean package --file pom.xml

- name: Run tests
run: mvn test --file pom.xml
java-version: 8
- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Run tests with Maven
run: mvn -B test --file pom.xml

0 comments on commit 0ac14a2

Please sign in to comment.