Skip to content

Merge pull request #393 from binkley/dependabot/maven/org.codehaus.mo… #215

Merge pull request #393 from binkley/dependabot/maven/org.codehaus.mo…

Merge pull request #393 from binkley/dependabot/maven/org.codehaus.mo… #215

name: Build with Maven using Batect
on:
push:
paths-ignore:
- '*.md'
- 'images/**'
pull_request:
paths-ignore:
- '*.md'
- 'images/**'
workflow_dispatch:
jobs:
build:
name: Builds and tests for Maven
runs-on: ubuntu-latest
steps:
- name: Clone repository
uses: actions/checkout@master
- name: Validate Batect wrapper scripts
uses: batect/[email protected]
- name: Restore Batect caches
uses: actions/cache@master
env:
cache-name: batect-cache
with:
path: ~/.batect
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/batect.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Manage Batect telemetry
run: ./batect --permanently-enable-telemetry
- name: Restore Maven caches
uses: actions/cache@master
env:
cache-name: maven-cache
with:
path: ~/.m2
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Build and test
run: ./batect build-with-maven
- name: Execute run script
run: ./batect -o quiet run-with-maven
- name: Save artifacts
uses: actions/upload-artifact@v3
with:
name: jars
path: target/modern-java-practices*.jar
- name: Save site
uses: actions/upload-artifact@v3
with:
name: site
path: target/site/