Skip to content

Commit

Permalink
Properly builds UI on UI related changes
Browse files Browse the repository at this point in the history
  • Loading branch information
quandor committed Mar 10, 2023
1 parent bc90ffa commit 82d1b1c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 24 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/configuration_ui_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,15 @@ on:
- 'components/inspectit-ocelot-configurationserver-ui/**'
workflow_call:


jobs:
test:
name: Test
runs-on: ubuntu-latest
container: openjdk:8-jdk
env:
working-directory: ./components/inspectit-ocelot-configurationserver-ui

working-directory: ./components/inspectit-ocelot-configurationserver
steps:
- uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'

- name: Install dependencies
working-directory: ${{env.working-directory}}
run: yarn install

- name: Run Eslint
working-directory: ${{env.working-directory}}
run: yarn lint

- name: Run Prettier
- uses: actions/checkout@v3
- name: Build frontend
working-directory: ${{env.working-directory}}
run: yarn format
run: ../../gradlew buildFrontend
17 changes: 13 additions & 4 deletions components/inspectit-ocelot-configurationserver/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,28 @@ node {
/**
* Task for installing the frontend dependencies.
*/
task installFrontend(type: YarnTask) {
def installFrontend = tasks.register('installFrontend', YarnTask) {
args = ['install']
}

def lintFrontend = tasks.register('lintFrontend', YarnTask) {
dependsOn installFrontend
args = ['lint']
}

def checkCodeStyleFrontend = tasks.register('checkCodeStyleFrontend', YarnTask) {
dependsOn installFrontend
args = ['format']
}

/**
* Task for building the frontend and copying it to the configuration-server project.
*/
task buildFrontend(type: YarnTask) {
tasks.register('buildFrontend', YarnTask) {
dependsOn lintFrontend, checkCodeStyleFrontend
args = ['export']
environment = [NODE_OPTIONS: "--openssl-legacy-provider"]
}
buildFrontend.dependsOn installFrontend


def serverMainClass = 'rocks.inspectit.ocelot.ConfigurationServer'

Expand Down

0 comments on commit 82d1b1c

Please sign in to comment.