Skip to content

Commit

Permalink
Merge pull request #2 from cultureamp/ce/github-actions
Browse files Browse the repository at this point in the history
Github Actions
  • Loading branch information
SushmaShyam authored Nov 11, 2021
2 parents f77ceea + c34aa96 commit d41cdcc
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 29 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: CI

on: [push]

jobs:
build:
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'
cache: gradle
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
- name: Build, test, lint
run: ./gradlew build
- name: Analyse dependencies for vulnerabilities
run: ./gradlew dependencyCheckAnalyze
- uses: actions/upload-artifact@v2
with:
name: Upload build artifacts
path: build/libs
- name: Cleanup Gradle Cache
# Remove some files from the Gradle cache, so they aren't cached by GitHub Actions.
# Restoring these files from a GitHub Actions cache might cause problems for future builds.
run: |
rm -f ~/.gradle/caches/modules-2/modules-2.lock
rm -f ~/.gradle/caches/modules-2/gc.properties
10 changes: 10 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ plugins {
// Add ktlint
id("org.jmailen.kotlinter") version "3.6.0"

// Vulnerable dependency checker
id("org.owasp.dependencycheck") version "6.4.1.1"

// Apply the java-library plugin for API and implementation separation.
`java-library`
}
Expand Down Expand Up @@ -36,3 +39,10 @@ dependencies {
// Use the Kotlin JUnit integration.
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
}

// A full list of config options can be found here:
// https://jeremylong.github.io/DependencyCheck/dependency-check-gradle/configuration.html
dependencyCheck {
// anything over a 5.0 is above a 'warning'
failBuildOnCVSS = 5.0F
}
29 changes: 0 additions & 29 deletions lib/build.gradle.kts

This file was deleted.

0 comments on commit d41cdcc

Please sign in to comment.