-
Notifications
You must be signed in to change notification settings - Fork 1
83 lines (70 loc) · 1.92 KB
/
test_webinterface.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
#
# Copyright (c) 2023-2024 Fraunhofer-Gesellschaft zur Förderung der angewandten Forschung e.V.
#
# This work is licensed under the Fraunhofer License (on the basis of the MIT license)
# that can be found in the LICENSE file.
#
name: "Test: Webinterface"
on:
push:
branches: [ main ]
paths: [ "webinterface/**" ]
pull_request:
branches: [ main ]
paths: [ "webinterface/**" ]
release:
types: [ published ]
permissions:
contents: read
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
lint-code:
name: Lint Code
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Lint Code
id: lint
working-directory: webinterface
run: ./gradlew ktlintCheck
run-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Publish watermarker to mavenLocal
working-directory: watermarker
run: ./gradlew publishToMavenLocal
- name: Run tests
id: test
working-directory: webinterface
run: ./gradlew test
verify-docker:
name: Verify Dockerfile Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Docker Image
run: docker build -t trend-webinterface -f webinterface/Dockerfile .