forked from cloudera/hue
-
Notifications
You must be signed in to change notification settings - Fork 0
150 lines (113 loc) · 4.19 KB
/
commitflow.yml
File metadata and controls
150 lines (113 loc) · 4.19 KB
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
name: Python 2 CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
container: gethue/hue:latest-py2
strategy:
matrix:
python-version: [2.7]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: refresh sources
run: |
pwd
rm -r /usr/share/hue/desktop/core/src/desktop
cp -r desktop/core/src/desktop /usr/share/hue/desktop/core/src/desktop
for lib in `ls desktop/libs`
do
rm -r /usr/share/hue/desktop/libs/$lib/src/$lib
cp -r desktop/libs/$lib/src/$lib /usr/share/hue/desktop/libs/$lib/src/$lib
done
for lib in `ls apps | grep -v Makefile`
do
rm -r /usr/share/hue/apps/$lib/src/$lib
cp -r apps/$lib/src/$lib /usr/share/hue/apps/$lib/src/$lib
done
rm -r /usr/share/hue/tools
cp -r tools /usr/share/hue
rm /usr/share/hue/desktop/conf/*.ini
cp desktop/conf/pseudo-distributed.ini.tmpl /usr/share/hue/desktop/conf/pseudo-distributed.ini
# ini configuration tweaks
## Very slow if on, cuts time in two and does not skip tests
sed -i 's/## has_iam_detection=true/ has_iam_detection=false/g' /usr/share/hue/desktop/conf/pseudo-distributed.ini
# make npm-install # Not available
cp babel.config.js /usr/share/hue
cp tsconfig.json /usr/share/hue
cp jest.config.js /usr/share/hue
cp .pylintrc /usr/share/hue
cp .stylelintrc /usr/share/hue
cp webpack.config*.js /usr/share/hue
rm /usr/share/hue/package.json
cp package.json /usr/share/hue
rm /usr/share/hue/package-lock.json
cp package-lock.json /usr/share/hue
cp -r docs /usr/share/hue
cd /usr/share/hue
npm install
npm i eslint-plugin-jest@latest --save-dev # Seems to not be found otherwise
npm run webpack
npm run webpack-login
npm run webpack-workers
./build/env/bin/hue collectstatic --noinput
# - name: run documentation lints
# run: |
# cd $GITHUB_WORKSPACE
# # Installs to move to image building
# curl -O https://dl.google.com/go/go1.15.linux-amd64.tar.gz
# tar -xvf go1.15.linux-amd64.tar.gz
# export GO111MODULE=on
# go/bin/go get -u github.com/raviqqe/muffet@v1.5.7
# curl --output hugo_0.69.0_Linux-64bit.tar.gz -L https://github.com/gohugoio/hugo/releases/download/v0.69.0/hugo_0.69.0_Linux-64bit.tar.gz
# tar -xvf hugo_0.69.0_Linux-64bit.tar.gz
# export PATH=$PWD:$HOME/go/bin:$PATH
# # Trigger linting if documentation changes
# ./tools/ci/check_for_website_dead_links.sh docs/docs-site
# # ./tools/ci/check_for_website_dead_links.sh docs/gethue
# Run code lints
# - name: run python lints
# run: |
# cd $GITHUB_WORKSPACE
# /usr/share/hue/build/env/bin/pip install pylint==1.7.5 pylint-django==0.7.2 configparser==4.0.2
# ./tools/ci/check_for_python_lint.sh /usr/share/hue
- name: run js lint
run: |
cp .prettierrc /usr/share/hue
cp .eslint* /usr/share/hue
cp tools /usr/share/hue -r
cd /usr/share/hue
npm run lint
- name: run npm license checker
run: |
cd /usr/share/hue
npm run check-license
- name: run style lint
run: |
cd /usr/share/hue
npm run style-lint
- name: run npm absolute path detection
run: |
cd /usr/share/hue
npm run check-absolute-paths
# Run tests
- name: run python API tests
run: |
cd /usr/share/hue
PYTHONWARNINGS=always ./build/env/bin/hue test unit --with-xunit --with-cover
- name: run js tests
run : |
cd /usr/share/hue
# https://jestjs.io/docs/en/troubleshooting.html#tests-are-extremely-slow-on-docker-andor-continuous-integration-ci-server
sed -i 's/"test": "jest"/"test": "jest --runInBand"/g' package.json
npm run test