Skip to content

Commit

Permalink
Merge pull request #1 from intuit/gitActions
Browse files Browse the repository at this point in the history
git actions
  • Loading branch information
raghav-agarwal authored Aug 16, 2023
2 parents 8e4f3b5 + 7481845 commit c644426
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 11 deletions.
14 changes: 4 additions & 10 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
# List of source code paths and code owners
# For more information on the CODEOWNERS file go to:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax

# Uncomment line 10 and add the correct owners's usernames.
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence,
# @global-owner1 and @global-owner2 will be requested for
# review when someone opens a pull request.
* @global-owner1 @global-owner2
# MAINTAINERS:
# Raghav Agarwal (@raghav-agarwal)
# Aditi Aggarwal (@aditi2205)
# Sonam Shenoy (@sonamkshenoy)
12 changes: 12 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Security Policy

## Supported Versions


| Version | Supported |
| ------- | ------------------ |
| 11 | JAVA |

## Reporting a Vulnerability

To report a vulnerability, please raise an issue on this repo under the issues tab.
1 change: 1 addition & 0 deletions .github/badges/branches.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"color": "#97ca00", "label": "branches", "message": "95.4%", "schemaVersion": 1}
1 change: 1 addition & 0 deletions .github/badges/branches.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions .github/badges/jacoco.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"color": "#97ca00", "label": "coverage", "message": "99.2%", "schemaVersion": 1}
1 change: 1 addition & 0 deletions .github/badges/jacoco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Documentation:
- any: ['**/*.txt', '**/*.md, docs/**']

Actions:
- '.github/workflows/*'

Tests:
- all: ['src/test/**', '**/*.java']

Code:
- all: ['src/main/**', '**/*.java']
64 changes: 64 additions & 0 deletions .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11 for x64
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
architecture: x64
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6

- name: Generate JaCoCo Badge
id: jacoco
uses: cicirello/jacoco-badge-generator@v2
with:
generate-coverage-badge: true
generate-coverage-endpoint: true
generate-branches-endpoint: true
generate-branches-badge: true

- name: Log coverage percentage
run: |
echo "coverage = ${{ steps.jacoco.outputs.coverage }}"
echo "branch coverage = ${{ steps.jacoco.outputs.branches }}"
- name: Commit the badge (if it changed)
run: |
if [[ `git status --porcelain` ]]; then
git config --global user.name 'Raghav Agarwal'
git config --global user.email 'bly.raghav@gmail.com'
git add -A
git commit -m "Autogenerated JaCoCo coverage badge"
git push
fi
- name: Upload JaCoCo coverage report
uses: actions/upload-artifact@v2
with:
name: jacoco-report
path: target/site/jacoco/
24 changes: 24 additions & 0 deletions .github/workflows/pr-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# This workflow will triage pull requests and apply a label based on the
# paths that are modified in the pull request.
#
# To use this workflow, you will need to set up a .github/labeler.yml
# file with configuration. For more information, see:
# https://github.com/actions/labeler

name: Labeler
on: [pull_request]

jobs:
label:

runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write

steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.RWPULSE_ACCESS_TOKEN }}"
sync-labels: true
dot: true
40 changes: 40 additions & 0 deletions .github/workflows/publish-central.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish package to the Maven Central Repository

on:
release:
types: [ published ]

jobs:
release:
name: Release on Sonatype OSS
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: 11
distribution: 'adopt'

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Set up Apache Maven Central
uses: actions/setup-java@v2
with: # running setup-java again overwrites the settings.xml
java-version: 11
distribution: 'adopt'
server-id: ossrh
server-username: OSSRH_USERNAME
server-password: OSSRH_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE

- name: Publish to Apache Maven Central
run: mvn -Prelease deploy
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
19 changes: 19 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# If the PR has the label release:major, release:minor, or release:patch, this will override bump_version_scheme.
# https://github.com/marketplace/actions/release-tag-new-action
on:
push:
branches:
- master

jobs:
release-on-push:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.RWPULSE_ACCESS_TOKEN }}
steps:
- id: release
name: Release Tag
uses: rymndhng/release-on-push-action@master
with:
bump_version_scheme: minor
tag_prefix: v
29 changes: 29 additions & 0 deletions .github/workflows/stale-pr-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
#
# You can adjust the behavior by modifying this file.
# For more information, see:
# https://github.com/actions/stale
name: Mark stale issues and pull requests

on:
schedule:
- cron: '0 10 * * *'

jobs:
stale:

runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write

steps:
- uses: actions/stale@v5
with:
repo-token: ${{ secrets.RWPULSE_ACCESS_TOKEN }}
stale-issue-message: 'Stale issue message'
stale-pr-message: 'Stale pull request message'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
days-before-issue-stale: 180
days-before-pr-stale: 10
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
[![Build Status](https://github.com/intuit/chain-z/actions/workflows/maven-build.yml/badge.svg)](https://github.com/intuit/chain-z/actions/workflows/maven-build.yml)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.intuit.async/chain-z/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.intuit.async/chain-z)
![coverage](.github/badges/jacoco.svg)
![branches coverage](.github/badges/branches.svg)


# RWebPulse

RWebPulse is a ready to consume JAR library to easily integrate your springboot project with the latest reactive web-client offered by the spring. It is a one stop solution with config based initialisations, exception and retry handling.
Expand Down Expand Up @@ -75,4 +81,4 @@ protected ClientHttpResponse<Map> executeRequest(final Map<String, Object> body)


## Local Development
[Local Development](./LOCAL_DEVELOPMENT.md)
[Local Development](./GETTING_STARTED.md)

0 comments on commit c644426

Please sign in to comment.