-
Notifications
You must be signed in to change notification settings - Fork 3
76 lines (71 loc) · 2.5 KB
/
ci.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
# 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.
# Unifies main + PR workflow.
#
# The unified CI workflow consists of 2 "stages":
# - Checks - test, intTest, NesQuEIT, etc
# - Finalize - a "success" dummy job for PRs + a "save to github-cache" job for push-to-main
#
# Utilizes the Gradle build cache for all stages. The updated build cache
# of the jobs in the checks stage are saved as artifacts (with the minimum
# retention period). The updated build cache is pushed back to GigHub's
# cache when the checks have successfully finished.
#
# Java CI runs against Java 11 and Java 17, where it is meaningful.
# (Spark tests always run against 11, so not run against Java 17.)
name: CI build
on:
push:
branches:
- main
- release-*
pull_request:
concurrency:
# PRs: 1 CI run concurrently / older ones are cancelled
# main branch: 1 CI run concurrently / all commits / no cancellation
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
ci:
name: CI
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: 'npm'
- name: NPM Install
run: npm install
- name: NPM Generate API
run: npm run generate-api
- name: NPM fix API
run: npm run fix-generated-client
- name: NPM build
env:
GENERATE_SOURCEMAP: false
DISABLE_ESLINT_PLUGIN: false
DISABLE_TERSER_PLUGIN: false
PROFILE_PLUGINS: false
run: npm run build
- name: NPM test
run: npm test -- --coverage
- name: NPM lint
run: npm run lint
- name: Generate UI jar
uses: gradle/gradle-build-action@v2
with:
cache-read-only: ${{ github.event_name != 'push' || github.ref != 'refs/heads/main' }}
arguments: jar