-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding GitHub Actions for Pull requests (#57)
* style: Formatted all the code to Google style * chore: Updated test dependencies * feat: Adding noarch jar to build job * ci: Added repo linter GHA * ci: Added PR workflow
- Loading branch information
1 parent
ee46a2b
commit db408b6
Showing
16 changed files
with
244 additions
and
131 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
name: Java CI - PR | ||
|
||
on: [ pull_request ] | ||
|
||
env: | ||
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up JDK 11 | ||
uses: actions/setup-java@v1 | ||
with: | ||
java-version: '11' | ||
java-package: jdk | ||
- name: Build with Gradle | ||
run: ./gradlew build --info --stacktrace | ||
- name: Package with Gradle | ||
run: ./gradlew package --warn --stacktrace | ||
- name: Push bin to GH workflow artifacts cache | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist-linux | ||
path: build/distributions | ||
|
||
snyk: | ||
name: Run security checks via snyk | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Run Snyk to check for vulnerabilities | ||
uses: snyk/actions/gradle-jdk11@master | ||
env: | ||
SNYK_TOKEN: ${{env.SNYK_TOKEN}} | ||
with: | ||
args: --severity-threshold=high |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# NOTE: This file should always be named `repolinter.yml` to allow | ||
# workflow_dispatch to work properly | ||
name: Repolinter Action | ||
|
||
# NOTE: This workflow will ONLY check the default branch! | ||
# Currently there is no elegant way to specify the default | ||
# branch in the event filtering, so branches are instead | ||
# filtered in the "Test Default Branch" step. | ||
on: [push, workflow_dispatch] | ||
|
||
jobs: | ||
repolint: | ||
name: Run Repolinter | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Test Default Branch | ||
id: default-branch | ||
uses: actions/github-script@v2 | ||
with: | ||
script: | | ||
const data = await github.repos.get(context.repo) | ||
return data.data && data.data.default_branch === context.ref.split('/').slice(-1)[0] | ||
- name: Checkout Self | ||
if: ${{ steps.default-branch.outputs.result == 'true' }} | ||
uses: actions/checkout@v2 | ||
- name: Run Repolinter | ||
if: ${{ steps.default-branch.outputs.result == 'true' }} | ||
uses: newrelic/repolinter-action@v1 | ||
with: | ||
config_url: https://raw.githubusercontent.com/newrelic/.github/main/repolinter-rulesets/community-plus.yml | ||
output_type: issue |
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
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
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
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
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
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
Oops, something went wrong.