-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.09 KB
/
CI.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
push:
branches:
- "**"
tags-ignore:
- "**"
jobs:
continuous-integration:
runs-on: ubuntu-latest
container:
image: maven:3-eclipse-temurin-21-jammy
volumes:
- ${{ runner.home }}/.m2:/root/.m2
env:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v4
with:
path: .m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Show file content
run: cat ~/.m2/settings.xml
- name: Test
run: mvn $MAVEN_CLI_OPTS test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build library
run: mvn -$MAVEN_CLI_OPTS clean package -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build CLI
run: mvn $MAVEN_CLI_OPTS clean package -Pcli -DskipTests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}