Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Create minimal unit test for Maven jobs #175

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/compose-maven-verify.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ on:
required: false
default: ""
type: string
MVN_GLOBAL_SETTINGS:
description: "Maven global settings configuration."
required: false
default: ${{ vars.GLOBAL_SETTINGS }}
type: string
ENV_VARS:
# yamllint disable-line rule:line-length
description: "Pass GitHub variables to be exported as environment variables via `toJSON(vars)` or specific variables encoded in JSON format"
Expand Down Expand Up @@ -128,4 +133,4 @@ jobs:
mvn-profiles: ${{ inputs.MVN_PROFILES }}
env-vars: ${{ inputs.ENV_VARS }}
env-secrets: ${{ inputs.ENV_SECRETS }}
global-settings: ${{ vars.GLOBAL_SETTINGS }}
global-settings: ${{ inputs.MVN_GLOBAL_SETTINGS }}
17 changes: 17 additions & 0 deletions .github/workflows/zzci-test-verify-maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: 2024 The Linux Foundation

name: Verify Maven Workflows

# yamllint disable-line rule:truthy
on: [push, pull_request]

jobs:
test-maven-verify:
uses: ./.github/workflows/compose-maven-verify.yaml
with:
GERRIT_BRANCH: ${{ github.ref }}
GERRIT_CHANGE_ID: Ic8aaa0728a43936cd4c6e1ed590e01ba8f0fbf5b
MVN_POM_FILE: test/maven-project/pom.xml
MVN_GLOBAL_SETTINGS: "<settings/>"
11 changes: 11 additions & 0 deletions test/maven-project/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!--
SPDX-License-Identifier: Apache-2.0
SPDX-FileCopyrightText: 2024 The Linux Foundation
-->
<project>
<modelVersion>4.0.0</modelVersion>

<groupId>org.linuxfoundation.test</groupId>
<artifactId>maven-test-app</artifactId>
<version>1</version>
</project>
Loading