Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/springwolf-plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
report_paths: '**/build/test-results/test/TEST-*.xml'

- name: Run e2e tests
run: ./gradlew -p springwolf-examples/e2e npm_run_test
run: ./gradlew -p springwolf-examples/e2e pnpm_run_install_deps test
env:
SPRINGWOLF_EXAMPLE: ${{ matrix.plugin }}
- uses: actions/upload-artifact@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/springwolf-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
run: ./gradlew -p ${{ env.project }} spotlessCheck

- name: Test
run: ./gradlew -p ${{ env.project }} npm_run_test
run: ./gradlew -p ${{ env.project }} test
- name: Publish Test Report
uses: mikepenz/action-junit-report@v6
if: success() || failure()
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jackson-core = "2.20.1"
kotlin = "2.2.21"
node-plugin = "7.1.0"
nodeVersion = "22.12.0"
npm = "10.9.0"
pnpm = "10.24.0"
openapi-gradle = "1.9.0"
org-junit-jupiter = "6.0.1"
org-junit-plattform = "6.0.1"
Expand Down
2 changes: 1 addition & 1 deletion springwolf-examples/e2e/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ To use the playwright ui, run
npm run start
```

For ci/cd or cli environments, use `../../gradlew npm_run_test` or
For ci/cd or cli environments, use `../../gradlew pnpm_run_test` or
```bash
npm run test
```
Expand Down
64 changes: 51 additions & 13 deletions springwolf-examples/e2e/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,81 @@ plugins {

node {
version = libs.versions.nodeVersion
npmVersion = libs.versions.npm
npmInstallCommand = 'ci'
pnpmVersion = libs.versions.pnpm
download = true
}

npm_run_test {
dependsOn spotlessCheck
tasks.register('pnpm_run_install_deps', PnpmTask) {
group = "pnpm"
dependsOn pnpmInstall

args = ['run', 'install:deps']

inputs.file 'playwright.config.ts'
inputs.file 'package.json'
inputs.file 'pnpm-lock.yaml'
outputs.upToDateWhen { true }
}

tasks.register('pnpm_run_lint', PnpmTask) {
group = "pnpm"
dependsOn pnpmInstall

args = ['run', 'lint']

inputs.files fileTree("tests")
inputs.files fileTree("util")
inputs.file 'playwright.config.ts'
inputs.file 'package.json'
inputs.file 'pnpm-lock.yaml'
outputs.upToDateWhen { true }
}
tasks.register('pnpm_run_lint_fix', PnpmTask) {
group = "pnpm"
dependsOn pnpmInstall

args = ['run', 'lint:fix']

inputs.files fileTree("tests")
inputs.files fileTree("util")
inputs.file 'playwright.config.ts'
inputs.file 'package.json'
inputs.file 'pnpm-lock.yaml'
outputs.upToDateWhen { true }
}

tasks.register('pnpm_run_test', PnpmTask) {
group = "pnpm"
dependsOn pnpmInstall
def springwolfExample = System.getenv("SPRINGWOLF_EXAMPLE") ?: "kafka"
dependsOn(":springwolf-examples:springwolf-$springwolfExample-example:dockerBuildImage")

args = ['run', 'test']

inputs.files fileTree("tests")
inputs.files fileTree("util")
inputs.file 'playwright.config.ts'
inputs.file 'package.json'
inputs.file 'package-lock.json'
inputs.file 'pnpm-lock.yaml'
outputs.upToDateWhen { true }
}

spotless {
encoding 'UTF-8'

def npmExec = System.getProperty('os.name').toLowerCase().contains('windows') ? '/npm.cmd' : '/bin/npm'
def nodeExec = System.getProperty('os.name').toLowerCase().contains('windows') ? '/node.exe' : '/bin/node'

format 'styling', {
target 'tests/**/*.ts', 'tests/**/*.js', 'util/**/*.ts', 'util/**/*.js'

prettier()
.npmExecutable("${tasks.named('npmSetup').get().npmDir.get()}${npmExec}")
.nodeExecutable("${tasks.named('nodeSetup').get().nodeDir.get()}${nodeExec}")

licenseHeader("/* SPDX-License-Identifier: Apache-2.0 */", "import|export|.* \\{")

trimTrailingWhitespace()
endWithNewline()
}
}

tasks.test.configure {
dependsOn('pnpm_run_test', 'pnpm_run_lint_fix')
}
tasks.named('spotlessStyling').configure {
it.dependsOn('nodeSetup', 'npmSetup')
it.dependsOn('nodeSetup', 'pnpmSetup', 'pnpm_run_lint')
}
98 changes: 0 additions & 98 deletions springwolf-examples/e2e/package-lock.json

This file was deleted.

11 changes: 9 additions & 2 deletions springwolf-examples/e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,20 @@
"scripts": {
"start": "playwright test --ui",
"test": "playwright test",
"postinstall": "npx playwright install --with-deps chromium"
"lint": "prettier --check \"(tests|util)/**/*.(js|ts|tsx|json|html|css)\"",
"lint:fix": "prettier --list-different --write \"(tests|util)/**/*.(js|ts|tsx|json|html|css)\"",
"install:deps": "npx playwright install --with-deps chromium"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@playwright/test": "^1.49.1",
"@types/node": "^22.10.2"
"@types/node": "^22.10.2",
"prettier": "^3.7.4"
},
"prettier": {
"singleQuote": false,
"trailingComma": "es5"
}
}
77 changes: 77 additions & 0 deletions springwolf-examples/e2e/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions springwolf-ui/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,6 @@ testem.log
# System files
.DS_Store
Thumbs.db


*.actual.json
4 changes: 2 additions & 2 deletions springwolf-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ __**Note: Check out our [contribution guidelines](../CONTRIBUTING.md) before sta

1. Run dependencies `npm i` (`../gradlew npmInstall`)
2. Run development server `npm start` (`../gradlew npmStart`)
3. Test `npm run test` (`../gradlew npm_run_test`)
4. Update with `npm run update` (`../gradlew npm_run_update`)
3. Test `npm run test` (`../gradlew pnpm_run_test`)
4. Update with `npm run update` (`../gradlew pnpm_run_update`)

Note: While npm and nodejs are used, they are managed by the gradle plugin. See commands in brackets in case you do not have a matching node version installed.

Expand Down
3 changes: 2 additions & 1 deletion springwolf-ui/angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@
}
},
"cli": {
"analytics": false
"analytics": false,
"packageManager": "pnpm"
},
"schematics": {
"@schematics/angular:component": {
Expand Down
Loading
Loading