1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-11-16 10:15:13 +00:00
plantuml/.github/workflows/ci.yml
2021-08-30 16:00:47 +10:00

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.2.0
with:
java-version: 8
distribution: 'temurin'
- 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