Skip to content

pact plugin upgrade to 4.6.1 #779

pact plugin upgrade to 4.6.1

pact plugin upgrade to 4.6.1 #779

Workflow file for this run

# This workflow will have a CI flow for FeeRegister Java(Gradle) project
name: fees register - CI
on:
pull_request:
branches:
- master
push:
branches:
- master
- refs/tags/*
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build gradle application
run: ./gradlew build
- name: Generate code coverage report
run: ./gradlew codeCoverageReport
- name: Publish report to Codecov
run: bash <(curl -s https://codecov.io/bash)
- name: Release Build in JitPack
run: |
echo "Triggering JitPack build"
PACKAGES_URL="https://jitpack.io/com/github/${GITHUB_REPOSITORY}/${GITHUB_REF#refs/tags/}/"
PACKAGES_FILE="packages.txt"
touch ${PACKAGES_FILE}
# Try the URL 3 times before failing
count=1
until [[ $count -gt 3 ]] || [[ $(cat ${PACKAGES_FILE} | wc -l | xargs ) -gt 1 ]] ; do
echo "Attempt ${count}/3"
STATUS=$(curl -s -o packages.txt -w "%{http_code}" --max-time 900 ${PACKAGES_URL})
let count+=1
sleep 30
done
echo "::group::Files Available"
echo $(cat ${PACKAGES_FILE})
echo "::endgroup::"
if [[ ${STATUS} -gt 399 ]] ; then
echo "FAILURE: ${STATUS} response from JitPack"
exit 1
fi
if: startsWith(github.ref, 'refs/tags')
- name: Cleanup Gradle Cache
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -fr ~/.gradle/caches/modules-2/*/plugin-resolution/