Skip to content

Commit 92c0332

Browse files
GitHub Actions jobs for testing (#184)
* added jobs for perform UI testing * get rid of Jenkinsfile * use unique match key for each job
1 parent b4a243f commit 92c0332

File tree

4 files changed

+72
-279
lines changed

4 files changed

+72
-279
lines changed

.github/workflows/backend.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,16 @@ on:
55
pull_request:
66
branches: [ master ]
77
jobs:
8-
build:
8+
mvn-all-build:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Cache local Maven repository
12-
uses: actions/cache@v2
12+
uses: actions/cache@v1
1313
with:
1414
path: ~/.m2/repository
15-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
15+
key: ${{ runner.os }}-maven-all-${{ hashFiles('**/pom.xml') }}
1616
restore-keys: |
17+
${{ runner.os }}-maven-all-
1718
${{ runner.os }}-maven-
1819
- uses: actions/checkout@v2
1920
- name: Set up JDK 1.13

.github/workflows/frontend.yaml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: frontend
2+
on:
3+
push:
4+
branches: [ '*' ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
npm-test:
9+
needs: [mvn-contract-build]
10+
env:
11+
CI: true
12+
NODE_ENV: dev
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Use Node.js
17+
uses: actions/setup-node@v1
18+
with:
19+
node-version: "14"
20+
- uses: actions/download-artifact@v2
21+
with:
22+
name: generated-sources
23+
path: kafka-ui-react-app/src/generated-sources
24+
- name: Cache node dependency
25+
uses: actions/cache@v1
26+
with:
27+
path: kafka-ui-react-app/node_modules
28+
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
29+
restore-keys: |
30+
${{ runner.os }}-node-
31+
- name: Install Node dependencies
32+
run: |
33+
cd kafka-ui-react-app/
34+
npm install
35+
- name: Linter
36+
run: |
37+
cd kafka-ui-react-app/
38+
npm run lint
39+
- name: Tests
40+
run: |
41+
cd kafka-ui-react-app/
42+
npm run test
43+
44+
mvn-contract-build:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Cache local Maven repository
48+
uses: actions/cache@v1
49+
with:
50+
path: ~/.m2/repository
51+
key: ${{ runner.os }}-maven-contract-${{ hashFiles('**/pom.xml') }}
52+
restore-keys: |
53+
${{ runner.os }}-maven-contract-
54+
${{ runner.os }}-maven-
55+
- uses: actions/checkout@v2
56+
- name: Set up JDK 1.13
57+
uses: actions/setup-java@v1
58+
with:
59+
java-version: 1.13
60+
- name: Build with Maven
61+
run: |
62+
cd kafka-ui-contract
63+
mvn clean package
64+
- uses: actions/upload-artifact@v2
65+
with:
66+
name: generated-sources
67+
path: kafka-ui-contract/target/generated-sources/frontend

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ jobs:
7474
build-args: |
7575
JAR_FILE=kafka-ui-api-${{ steps.prep.outputs.version }}.jar
7676
cache-from: type=local,src=/tmp/.buildx-cache
77-
cache-to: type=local,dest=/tmp/.buildx-cache
77+
cache-to: type=local,dest=/tmp/.buildx-cache

Jenkinsfile

Lines changed: 0 additions & 275 deletions
This file was deleted.

0 commit comments

Comments
 (0)