forked from eclipse-tractusx/tractusx-edc
-
Notifications
You must be signed in to change notification settings - Fork 0
169 lines (139 loc) · 4.96 KB
/
verify.yaml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
#################################################################################
# Copyright (c) 2023 Mercedes-Benz Tech Innovation GmbH
# Copyright (c) 2021,2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License, Version 2.0 which is available at
# https://www.apache.org/licenses/LICENSE-2.0.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# SPDX-License-Identifier: Apache-2.0
#################################################################################
---
name: "Verify"
on:
workflow_call:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
verify-license-headers:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: "Check for files without a license header"
run: |-
# checks all java, yaml, kts and sql files for an Apache 2.0 license header
cmd="grep -riL \"SPDX-License-Identifier: Apache-2.0\" --include=\*.{java,yaml,yml,kts,sql} --exclude-dir={.gradle,\*\openapi} ."
violations=$(eval $cmd | wc -l)
if [[ $violations -ne 0 ]] ; then
echo "$violations files without license headers were found:";
eval $cmd;
exit 1;
fi
verify-helm-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: addnab/docker-run-action@v3
with:
image: jnorwood/helm-docs:v1.10.0
options: -v ${{ github.workspace }}/charts:/helm-docs
run: helm-docs
- run: |
if $(git diff --quiet --exit-code); then
echo "Helm chart docs up to date"
else
echo "Helm chart docs not up to date:"
git diff
exit 1
fi
verify-dependencies:
uses: eclipse-edc/.github/.github/workflows/dependency-check.yml@main
verify-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Checkstyle
run: |
./gradlew checkstyleMain checkstyleTest
verify-javadoc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Javadoc
run: ./gradlew javadoc
unit-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Unit tests
run: ./gradlew test
integration-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Integration tests
run: |
./gradlew :edc-tests:runtime:mock-connector:dockerize
./gradlew test -DincludeTags="ComponentTest"
api-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run API tests
run: ./gradlew test -DincludeTags="ApiTest"
end-to-end-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
variant: [ { dir: edc-tests/edc-controlplane/catalog-tests },
{ dir: edc-tests/edc-controlplane/edr-api-tests },
{ dir: edc-tests/edc-controlplane/iatp-tests },
{ dir: edc-tests/edc-controlplane/policy-tests },
{ dir: edc-tests/edc-controlplane/transfer-tests },
{ dir: edc-tests/edc-dataplane/edc-dataplane-tokenrefresh-tests }
]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run E2E tests (${{ matrix.variant.dir }})
run: |
./gradlew compileJava compileTestJava --refresh-dependencies
./gradlew -p ${{ matrix.variant.dir }} test -DincludeTags="EndToEndTest" -PverboseTest=true
postgres-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16.1
ports:
- 5432:5432
env:
POSTGRES_PASSWORD: password
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Postgresql E2E tests
run: ./gradlew test -DincludeTags="PostgresqlIntegrationTest" --refresh-dependencies
cloud-transfer-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-java
- name: Run Azure/S3 dataplane tests
run: |
./gradlew compileJava compileTestJava
./gradlew -p edc-tests/edc-dataplane test -DincludeTags="CloudTransferTest"