Skip to content

Commit e695853

Browse files
authored
Merge pull request #175 from zxiiro/maven-test
Test: Create minimal unit test for Maven jobs
2 parents 8aebf23 + 656ca0a commit e695853

File tree

3 files changed

+34
-1
lines changed

3 files changed

+34
-1
lines changed

.github/workflows/compose-maven-verify.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ on:
8484
required: false
8585
default: ""
8686
type: string
87+
MVN_GLOBAL_SETTINGS:
88+
description: "Maven global settings configuration."
89+
required: false
90+
default: ${{ vars.GLOBAL_SETTINGS }}
91+
type: string
8792
ENV_VARS:
8893
# yamllint disable-line rule:line-length
8994
description: "Pass GitHub variables to be exported as environment variables via `toJSON(vars)` or specific variables encoded in JSON format"
@@ -128,4 +133,4 @@ jobs:
128133
mvn-profiles: ${{ inputs.MVN_PROFILES }}
129134
env-vars: ${{ inputs.ENV_VARS }}
130135
env-secrets: ${{ inputs.ENV_SECRETS }}
131-
global-settings: ${{ vars.GLOBAL_SETTINGS }}
136+
global-settings: ${{ inputs.MVN_GLOBAL_SETTINGS }}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
# SPDX-License-Identifier: Apache-2.0
3+
# SPDX-FileCopyrightText: 2024 The Linux Foundation
4+
5+
name: Verify Maven Workflows
6+
7+
# yamllint disable-line rule:truthy
8+
on: [push, pull_request]
9+
10+
jobs:
11+
test-maven-verify:
12+
uses: ./.github/workflows/compose-maven-verify.yaml
13+
with:
14+
GERRIT_BRANCH: ${{ github.ref }}
15+
GERRIT_CHANGE_ID: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
16+
MVN_POM_FILE: test/maven-project/pom.xml
17+
MVN_GLOBAL_SETTINGS: "<settings/>"

test/maven-project/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!--
2+
SPDX-License-Identifier: Apache-2.0
3+
SPDX-FileCopyrightText: 2024 The Linux Foundation
4+
-->
5+
<project>
6+
<modelVersion>4.0.0</modelVersion>
7+
8+
<groupId>org.linuxfoundation.test</groupId>
9+
<artifactId>maven-test-app</artifactId>
10+
<version>1</version>
11+
</project>

0 commit comments

Comments
 (0)