Skip to content

Commit 9941c84

Browse files
committed
Add new GitHub Actions pipeline for frontend CI
1 parent 473ccc2 commit 9941c84

File tree

5 files changed

+32
-16
lines changed

5 files changed

+32
-16
lines changed

.github/renovate.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@
1212
"matchDatasources": ["npm"],
1313
"addLabels": ["javascript"],
1414
"automerge": false
15-
},
16-
{
17-
"matchPackageNames": ["node"],
18-
"allowedVersions": "/22.[0-9]+.[0-9]+(.[0-9]+)?$/"
1915
}
2016
],
2117
"customManagers": [

.github/workflows/frontend.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: frontend
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
ci:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Extract versions from pom.xml
15+
id: extract_versions
16+
run: |
17+
NODE_VERSION=$(sed -n 's/.*<node.version>\(.*\)<\/node.version>.*/\1/p' pom.xml)
18+
NPM_VERSION=$(sed -n 's/.*<npm.version>\(.*\)<\/npm.version>.*/\1/p' pom.xml)
19+
echo "NODE_VERSION=$NODE_VERSION" >> "$GITHUB_ENV"
20+
echo "NPM_VERSION=$NPM_VERSION" >> "$GITHUB_ENV"
21+
- uses: actions/setup-node@v4
22+
with:
23+
node-version: '${{ env.NODE_VERSION }}'
24+
cache: 'npm'
25+
- run: npm install --global 'npm@${{ env.NPM_VERSION }}'
26+
- run: npm ci
27+
- run: npm run lint
28+
- run: npm run build
29+
- run: npm test

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
22
"name": "pipeline-graph-view-plugin",
3-
"version": "1.0.0",
3+
"version": "0.0.0-development",
44
"description": "Pipeline Graph visualization for Jenkins pipelines",
55
"private": true,
66
"type": "module",
77
"scripts": {
88
"mvnbuild": "npm run build",
9-
"mvntest": "npm test",
9+
"mvntest": "echo 'Tests are run with npm test'",
1010
"build": "vite build --mode production",
1111
"build:dev": "vite build --mode development --watch",
1212
"lint": "tsc && eslint && prettier --check .",
1313
"lint:fix": "eslint --fix && prettier --write .",
14-
"test": "vitest --watch=false --reporter default --reporter junit && npm run lint",
14+
"test": "vitest --watch=false",
1515
"test:dev": "vitest --watch"
1616
},
1717
"repository": {

pom.xml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,6 @@
3838
<node.version>22.15.0</node.version>
3939
<npm.version>11.3.0</npm.version>
4040
<spotless.check.skip>false</spotless.check.skip>
41-
42-
<!-- Opt in to Jenkins handling eslint results -->
43-
<maven.test.failure.ignore>false</maven.test.failure.ignore>
44-
<frontend.testFailureIgnore>${maven.test.failure.ignore}</frontend.testFailureIgnore>
4541
</properties>
4642

4743
<dependencyManagement>

vitest.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
import { defineConfig } from "vitest/config";
2-
import path from "node:path";
32

43
export default defineConfig({
54
test: {
65
root: "src/main/frontend",
76
globals: true,
87
environment: "jsdom",
98
setupFiles: ["setupTests.ts"],
10-
outputFile: path.resolve(
11-
import.meta.dirname,
12-
"target/surefire-reports/vitest-junit.xml",
13-
),
149
},
1510
});

0 commit comments

Comments
 (0)