-
Notifications
You must be signed in to change notification settings - Fork 19
51 lines (45 loc) · 1.85 KB
/
build-test.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
41
42
43
44
45
46
47
48
49
50
51
# This workflow will build and test a Java project with Maven
name: build
on:
pull_request:
push:
workflow_dispatch:
jobs:
dupe_check:
name: Check for Duplicate Workflow Run
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@v5.3.1
with:
concurrent_skipping: same_content_newer
do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]'
build:
if: needs.dupe_check.outputs.should_skip != 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
overwrite-settings: false
cache: 'maven'
- name: Manually Install Test Support If Necessary
if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
run: |
sudo apt-get update -qq
sudo apt-get install -y libxml2-utils
version="$(xmllint --xpath '/*[local-name()="project"]/*[local-name()="properties"]/*[local-name()="solace.integration.test.support.version"]/text()' pom.xml)"
echo "Detected test support version: ${version}"
git clone --depth 1 --branch "${version}" https://github.com/SolaceDev/solace-integration-test-support.git
cd "${GITHUB_WORKSPACE}/solace-integration-test-support"
mvn install -Dchangelist= -DskipTests
- name: Build and run Tests
run: mvn clean verify --settings "${GITHUB_WORKSPACE}/maven/settings.xml"
env:
SOLACEDEV_GITHUB_USERNAME: ${{ secrets.SOLACEDEV_GITHUB_USERNAME }}
SOLACEDEV_GITHUB_TOKEN: ${{ secrets.SOLACEDEV_GITHUB_TOKEN }}