49 increment coverage for testing PR #113
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Java CI with Maven (PR) | |
on: | |
pull_request: | |
types: [opened, synchronize, ready_for_review, labeled] | |
concurrency: pr-${{ github.event.pull_request.id }} | |
jobs: | |
check-version: | |
runs-on: ubuntu-latest | |
if: ${{ contains(github.event.pull_request.labels.*.name, 'release') || contains(github.event.pull_request.labels.*.name, 'maven') }} | |
steps: | |
- uses: actions/checkout@v3 | |
continue-on-error: true | |
- name: Check if version is updated | |
uses: avides/[email protected] | |
id: maven_processor_version_check | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
file-to-check: pom.xml | |
continue-on-error: true | |
- name: Warn about version specification | |
if: ${{steps.maven_processor_version_check.outcome != 'success' }} | |
uses: thollander/actions-comment-pull-request@v1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: Project version has not been updated in pom.xml. Please, update your version using https://semver.org specifications | |
- name: Fail | |
if: ${{steps.maven_processor_version_check.outcome != 'success' }} | |
uses: cutenode/action-always-fail@v1 | |
- name: New software version | |
if: ${{ steps.maven_processor_version_check.outcome == 'success' }} | |
run: echo "New Pact Annotation Builder engine version is " ${{ steps.maven_processor_version_check.version }} | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
java-version: "17" | |
distribution: "adopt" | |
- name: Cache Maven packages | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Build Maven Plugin | |
# Uses production profile to sign with gpg plugin | |
run: | | |
mvn -B install | |
check-labels: | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.mergeable == true | |
steps: | |
- name: Warn about missing labels | |
if: ${{ !contains(github.event.pull_request.labels.*.name, 'release') && !contains(github.event.pull_request.labels.*.name, 'documentation') && !contains(github.event.pull_request.labels.*.name, 'maven') && !contains(github.event.pull_request.labels.*.name, 'gradle')}}} | |
uses: thollander/actions-comment-pull-request@v2 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
message: "This pull request hasn't been labeled as `release`, `gradle`, `maven` nor `documentation`. Please ensure this is intentional before merging." | |
comment_tag: label-warn |