forked from pandas-dev/pandas
-
Notifications
You must be signed in to change notification settings - Fork 0
159 lines (132 loc) · 4.48 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
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
name: CI
on:
push:
branches: master
pull_request:
branches: master
env:
ENV_FILE: environment.yml
jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- name: Setting conda path
run: echo "::add-path::${HOME}/miniconda3/bin"
- name: Checkout
uses: actions/checkout@v1
- name: Looking for unwanted patterns
run: ci/code_checks.sh patterns
if: always()
- name: Setup environment and build pandas
run: ci/setup_env.sh
if: always()
- name: Linting
run: |
source activate pandas-dev
ci/code_checks.sh lint
if: always()
- name: Dependencies consistency
run: |
source activate pandas-dev
ci/code_checks.sh dependencies
if: always()
- name: Checks on imported code
run: |
source activate pandas-dev
ci/code_checks.sh code
if: always()
- name: Running doctests
run: |
source activate pandas-dev
ci/code_checks.sh doctests
if: always()
- name: Docstring validation
run: |
source activate pandas-dev
ci/code_checks.sh docstrings
if: always()
- name: Typing validation
run: |
source activate pandas-dev
ci/code_checks.sh typing
if: always()
- name: Testing docstring validation script
run: |
source activate pandas-dev
pytest --capture=no --strict scripts
if: always()
- name: Running benchmarks
run: |
source activate pandas-dev
cd asv_bench
asv check -E existing
git remote add upstream https://github.com/pandas-dev/pandas.git
git fetch upstream
if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
asv machine --yes
asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
if grep "failed" benchmarks.log > /dev/null ; then
exit 1
fi
else
echo "Benchmarks did not run, no changes detected"
fi
if: always()
- name: Publish benchmarks artifact
uses: actions/upload-artifact@master
with:
name: Benchmarks log
path: asv_bench/benchmarks.log
if: failure()
web_and_docs:
name: Web and docs
runs-on: ubuntu-latest
steps:
- name: Setting conda path
run: echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
- name: Checkout
uses: actions/checkout@v1
- name: Setup environment and build pandas
run: ci/setup_env.sh
- name: Build website
run: |
source activate pandas-dev
python web/pandas_web.py web/pandas --target-path=web/build
- name: Build documentation
run: |
source activate pandas-dev
doc/make.py --warnings-are-errors | tee sphinx.log ; exit ${PIPESTATUS[0]}
# This can be removed when the ipython directive fails when there are errors,
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
- name: Check ipython directive errors
run: "! grep -B1 \"^<<<-------------------------------------------------------------------------$\" sphinx.log"
- name: Merge website and docs
run: |
mkdir -p pandas_web/docs
cp -r web/build/* pandas_web/
cp -r doc/build/html/* pandas_web/docs/
if: github.event_name == 'push'
- name: Install Rclone
run: sudo apt install rclone -y
if: github.event_name == 'push'
- name: Set up Rclone
run: |
RCLONE_CONFIG_PATH=$HOME/.config/rclone/rclone.conf
mkdir -p `dirname $RCLONE_CONFIG_PATH`
echo "[ovh_cloud_pandas_web]" > $RCLONE_CONFIG_PATH
echo "type = swift" >> $RCLONE_CONFIG_PATH
echo "env_auth = false" >> $RCLONE_CONFIG_PATH
echo "auth_version = 3" >> $RCLONE_CONFIG_PATH
echo "auth = https://auth.cloud.ovh.net/v3/" >> $RCLONE_CONFIG_PATH
echo "endpoint_type = public" >> $RCLONE_CONFIG_PATH
echo "tenant_domain = default" >> $RCLONE_CONFIG_PATH
echo "tenant = 2977553886518025" >> $RCLONE_CONFIG_PATH
echo "domain = default" >> $RCLONE_CONFIG_PATH
echo "user = w4KGs3pmDxpd" >> $RCLONE_CONFIG_PATH
echo "key = ${{ secrets.ovh_object_store_key }}" >> $RCLONE_CONFIG_PATH
echo "region = BHS" >> $RCLONE_CONFIG_PATH
if: github.event_name == 'push'
- name: Sync web
run: rclone sync pandas_web ovh_cloud_pandas_web:dev
if: github.event_name == 'push'