forked from projectnessie/nessie
-
Notifications
You must be signed in to change notification settings - Fork 0
191 lines (166 loc) · 5.35 KB
/
pull-request.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
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
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# Copyright (C) 2020 Dremio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://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.
# Projectnessie GitHub Pull-Request / Default CI
name: PR Build Check
on:
pull_request:
types: [opened, synchronize, reopened]
# NOTE: using paths-ignore here doesn't play well with "Require status checks to pass before merging"
# due to https://github.community/t/feature-request-conditional-required-checks/16761
# paths-ignore:
# - 'LICENSE'
# - 'NOTICE'
# - '**.md'
# - '!site/**'
# - '.github/renovate.json5'
# - '.github/workflows/release*.yml'
# - '.github/workflows/check*.yml'
# - '.idea/**'
# - '.editorconfig'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
java:
name: Java/Gradle
runs-on: ubuntu-20.04
env:
SPARK_LOCAL_IP: localhost
steps:
- uses: actions/checkout@v3.2.0
- name: Setup runner
uses: ./.github/actions/setup-runner
- name: Setup Java, Gradle
uses: ./.github/actions/dev-tool-java
- name: Gradle / spotless
uses: gradle/gradle-build-action@v2
with:
# 'spotlessCheck' separate: workaround until
# https://github.com/diffplug/spotless/issues/1215 is fixed - should be merged w/ next step
arguments: spotlessCheck --scan
- name: Gradle / compile
uses: gradle/gradle-build-action@v2
with:
arguments: checkstyleMain checkstyleTest jar testClasses --scan
- name: Gradle / unit test
uses: gradle/gradle-build-action@v2
env:
SPARK_LOCAL_IP: localhost
with:
arguments: test --scan
- name: Gradle / check incl. integ-test
uses: gradle/gradle-build-action@v2
with:
arguments: check -x spotlessCheck -x checkstyleMain -x checkstyleTest --scan
- name: Gradle / Gatling simulations
uses: gradle/gradle-build-action@v2
with:
arguments: gatlingRun
# Exercise these tasks to ensure those do not error out
- name: Gradle / assemble + publish local
uses: gradle/gradle-build-action@v2
with:
arguments: |
assemble
publishToMavenLocal
codeCoverageReport -x test -x intTest
--scan
- name: Gradle / build tools integration tests
uses: gradle/gradle-build-action@v2
with:
arguments: buildToolsIntegrationTest
- name: Capture Test Reports
uses: actions/upload-artifact@v3
if: ${{ failure() }}
with:
name: test-results
path: |
**/build/reports/*
**/build/test-results/*
- name: Capture Results
uses: ./.github/actions/ci-results
python:
name: Python
runs-on: ubuntu-20.04
env:
working-directory: ./python
strategy:
max-parallel: 4
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3.2.0
- name: Setup Python
uses: ./.github/actions/dev-tool-python
with:
python-version: ${{ matrix.python-version }}
- name: Test with tox
run: tox
working-directory: ${{env.working-directory}}
- uses: codecov/codecov-action@v3
if: github.repository_owner == 'projectnessie'
continue-on-error: true
with:
verbose: true
fail_ci_if_error: true
flags: python
site:
name: Build Website
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3.2.0
- name: Setup Python
uses: ./.github/actions/dev-tool-python
with:
python-version: '3.8'
- name: Install dependencies
run: python3 -m pip install -r ./site/requirements.txt
- name: Check code block indentation
run: python3 check_code_indent.py
working-directory: ./site
- name: Generate Static Site
run: mkdocs build
working-directory: ./site
helm-testing:
name: Lint & Test Helm chart
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3.2.0
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.8.1
- uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Set up chart-testing
uses: helm/chart-testing-action@main
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --target-branch ${{ github.event.repository.default_branch }})
if [[ -n "$changed" ]]; then
echo "::set-output name=changed::true"
fi
- name: Run chart-testing (lint)
run: ct lint --debug --charts ./helm/nessie
- name: Set up & Start Minikube
uses: medyagh/setup-minikube@master
- name: Show pods
run: kubectl get pods -A
- name: Run chart-testing (install)
run: ct install --debug --charts ./helm/nessie