mirror of
https://github.com/octoleo/plantuml.git
synced 2024-11-19 19:55:09 +00:00
9500aac9c4
As setup-java@2 requires `distribution`, set it to `adopt`. https://github.com/actions/setup-java/blob/main/README.md#Supported-distributions
39 lines
1.1 KiB
YAML
39 lines
1.1 KiB
YAML
name: tests
|
|
|
|
on:
|
|
pull_request:
|
|
types: [ opened, synchronize, reopened ]
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
run_tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout the repository
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK 8
|
|
uses: actions/setup-java@v2.1.0
|
|
with:
|
|
java-version: 8
|
|
distribution: 'adopt'
|
|
|
|
- name: Cache local Maven repository
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.m2/repository
|
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-maven-
|
|
|
|
# Downloading all the dependencies is very log spammy so we do this in its own step.
|
|
# Also the cache is reused by the "release" workflow but the workflow here does not use all
|
|
# dependencies so without the priming step the cache will be missing some things.
|
|
- name: Prime Maven cache
|
|
run: mvn --batch-mode dependency:go-offline
|
|
|
|
- name: Run tests with Maven
|
|
run: mvn -B test --file pom.xml
|