Skip to content

Commit

Permalink
Bump GitHub Actions + gradle-node plugin (#757)
Browse files Browse the repository at this point in the history
* Bump GitHub Actions + gradle-node plugin

Also updated dependabot to group npm updates together, and ran `npm audit fix`.

* Remove CodeBuild badge - now builds in GH Actions
  • Loading branch information
marcus-bcl authored Jun 19, 2024
1 parent a38274e commit eb8314e
Show file tree
Hide file tree
Showing 7 changed files with 88 additions and 164 deletions.
8 changes: 6 additions & 2 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,17 @@ runs:
using: composite
steps:
- name: Setup Java
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ui/package-lock.json

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
14 changes: 13 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,21 @@ updates:
- package-ecosystem: "npm"
directory: "/ui"
schedule:
interval: "monthly" # to reduce frequency of npm updates
interval: "daily"
groups:
minor:
update-types:
- "minor"
- "patch"
patterns:
- "*"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

- package-ecosystem: "github-actions"
directory: "/.github/actions/setup"
schedule:
interval: "daily"
1 change: 0 additions & 1 deletion README.MD
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
[![Accessibility](https://github.com/ministryofjustice/ndelius-um/actions/workflows/accessibility.yml/badge.svg)](https://github.com/ministryofjustice/ndelius-um/actions/workflows/accessibility.yml)
[![Code Quality](https://github.com/ministryofjustice/ndelius-um/actions/workflows/code-quality.yml/badge.svg)](https://github.com/ministryofjustice/ndelius-um/actions/workflows/code-quality.yml)
[![Tests](https://github.com/ministryofjustice/ndelius-um/actions/workflows/test.yml/badge.svg)](https://github.com/ministryofjustice/ndelius-um/actions/workflows/test.yml)
[![CodeBuild](https://codebuild.eu-west-2.amazonaws.com/badges?uuid=eyJlbmNyeXB0ZWREYXRhIjoibGlVbnBpVjBXZzlUVFU0N1dGRUNCblVCcng3TGJhUHR4SXFRclNqclJNMFFxenBoQ1dWNTdiODA2dGJmalRvWVVmNmpkcTk2QnRMdGxLNnpKb3hYQUZzPSIsIml2UGFyYW1ldGVyU3BlYyI6InllcDVab0ptZEhaZ2R6ckciLCJtYXRlcmlhbFNldFNlcmlhbCI6MX0%3D&branch=master)](https://eu-west-2.console.aws.amazon.com/codesuite/codebuild/895523100917/projects/user-management-build)

Developed by [Unilink](https://www.unilink.com) using Angular and Spring Boot to enable NPS-ICT and CRC admins to effectively create and maintain user accounts in the National Delius application, and to allow external services to securely authenticate Probation staff.
User accounts are stored across an LDAP cluster (for authentication, user preferences and functional authorisation), and an Oracle database (for data authorisation and caseload management).
Expand Down
25 changes: 10 additions & 15 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ plugins {
id 'jacoco'
id 'org.springframework.boot' version '2.7.18'
id 'io.spring.dependency-management' version '1.1.5'
id 'com.github.node-gradle.node' version '3.5.1'
id 'com.github.node-gradle.node' version '7.0.2'
id 'io.gatling.gradle' version '3.11.3'
id 'org.sonarqube' version '3.5.0.2730'
id 'com.gorylenko.gradle-git-properties' version '2.4.2'
id 'org.owasp.dependencycheck' version '9.2.0'
}
Expand All @@ -23,19 +22,19 @@ bootBuildImage {
environment['BPE_DELIM_JAVA_TOOL_OPTIONS'] = ' '
environment['BPE_APPEND_JAVA_TOOL_OPTIONS'] = '--add-opens=java.base/java.lang=ALL-UNNAMED'
}
bootRun {
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
}
bootRun.jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
gitProperties { failOnNoGitDirectory = false }
jar { enabled = false }

// Node/NPM
node {
version = '22.2.0'
download = true
nodeModulesDir = file('ui')
nodeProjectDir = file('ui')
npmInstallCommand = "ci"
}
task npmBuild(type: NpmTask, dependsOn: npmInstall) {
tasks.register('npmBuild', NpmTask) {
dependsOn npmInstall
npmCommand = ['run', 'build-prod']
}
processResources.dependsOn(npmBuild)
Expand All @@ -44,15 +43,11 @@ sourceSets { main.resources.srcDirs 'ui/dist' }
clean { delete 'ui/dist' }

// Tests
test {
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
}

// Jacoco test coverage
jacoco.toolVersion '0.8.12'
jacocoTestReport.reports.html.destination file("${buildDir}/reports/coverage/test")
plugins.withType(JacocoPlugin) {
tasks['test'].finalizedBy jacocoTestReport
jacocoTestReport.reports.html.outputLocation.set(layout.buildDirectory.dir('reports/coverage/test'))
tasks.named('test', Test).configure {
jvmArgs '--add-opens=java.base/java.lang=ALL-UNNAMED'
finalizedBy jacocoTestReport
}

// Dependency vulnerability scanning
Expand Down
54 changes: 0 additions & 54 deletions buildspec.yml

This file was deleted.

1 change: 1 addition & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/tmp
/out-tsc
.angular
/src/coverage/

# dependencies
/node_modules
Expand Down
Loading

0 comments on commit eb8314e

Please sign in to comment.