@@ -2,90 +2,82 @@ name: CI
2
2
3
3
on :
4
4
push :
5
- branches : master
5
+ branches : [ master]
6
6
pull_request :
7
- branches : master
7
+ branches :
8
+ - master
9
+ - 1.2.x
8
10
9
11
env :
10
12
ENV_FILE : environment.yml
13
+ PANDAS_CI : 1
11
14
12
15
jobs :
13
16
checks :
14
17
name : Checks
15
18
runs-on : ubuntu-latest
16
- steps :
17
-
18
- - name : Setting conda path
19
- run : echo "::add-path::${HOME}/miniconda3/bin"
19
+ defaults :
20
+ run :
21
+ shell : bash -l {0}
20
22
23
+ steps :
21
24
- name : Checkout
22
25
uses : actions/checkout@v1
23
26
24
27
- name : Looking for unwanted patterns
25
28
run : ci/code_checks.sh patterns
26
29
if : always()
27
30
28
- - name : Setup environment and build pandas
29
- run : ci/setup_env.sh
30
- if : always()
31
+ - name : Cache conda
32
+ uses : actions/cache@v2
33
+ with :
34
+ path : ~/conda_pkgs_dir
35
+ key : ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
31
36
32
- - name : Linting
33
- run : |
34
- source activate pandas-dev
35
- ci/code_checks.sh lint
36
- if : always()
37
+ - uses : conda-incubator/setup-miniconda@v2
38
+ with :
39
+ activate-environment : pandas-dev
40
+ channel-priority : strict
41
+ environment-file : ${{ env.ENV_FILE }}
42
+ use-only-tar-bz2 : true
37
43
38
- - name : Dependencies consistency
39
- run : |
40
- source activate pandas-dev
41
- ci/code_checks.sh dependencies
44
+ - name : Build Pandas
45
+ uses : ./.github/actions/build_pandas
46
+
47
+ - name : Linting
48
+ run : ci/code_checks.sh lint
42
49
if : always()
43
50
44
51
- name : Checks on imported code
45
- run : |
46
- source activate pandas-dev
47
- ci/code_checks.sh code
52
+ run : ci/code_checks.sh code
48
53
if : always()
49
54
50
55
- name : Running doctests
51
- run : |
52
- source activate pandas-dev
53
- ci/code_checks.sh doctests
56
+ run : ci/code_checks.sh doctests
54
57
if : always()
55
58
56
59
- name : Docstring validation
57
- run : |
58
- source activate pandas-dev
59
- ci/code_checks.sh docstrings
60
+ run : ci/code_checks.sh docstrings
60
61
if : always()
61
62
62
63
- name : Typing validation
63
- run : |
64
- source activate pandas-dev
65
- ci/code_checks.sh typing
64
+ run : ci/code_checks.sh typing
66
65
if : always()
67
66
68
67
- name : Testing docstring validation script
69
- run : |
70
- source activate pandas-dev
71
- pytest --capture=no --strict scripts
68
+ run : pytest --capture=no --strict-markers scripts
72
69
if : always()
73
70
74
71
- name : Running benchmarks
75
72
run : |
76
- source activate pandas-dev
77
73
cd asv_bench
78
74
asv check -E existing
79
75
git remote add upstream https://github.com/pandas-dev/pandas.git
80
76
git fetch upstream
81
- if git diff upstream/master --name-only | grep -q "^asv_bench/"; then
82
- asv machine --yes
83
- asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
84
- if grep "failed" benchmarks.log > /dev/null ; then
85
- exit 1
86
- fi
87
- else
88
- echo "Benchmarks did not run, no changes detected"
77
+ asv machine --yes
78
+ asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
79
+ if grep "failed" benchmarks.log > /dev/null ; then
80
+ exit 1
89
81
fi
90
82
if : always()
91
83
@@ -101,20 +93,16 @@ jobs:
101
93
runs-on : ubuntu-latest
102
94
steps :
103
95
104
- - name : Setting conda path
105
- run : echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
106
-
107
96
- name : Checkout
108
97
uses : actions/checkout@v1
109
98
110
- - name : Setup environment and build pandas
111
- run : ci/setup_env.sh
99
+ - name : Set up pandas
100
+ uses : ./.github/actions/setup
112
101
113
102
- name : Build website
114
103
run : |
115
104
source activate pandas-dev
116
105
python web/pandas_web.py web/pandas --target-path=web/build
117
-
118
106
- name : Build documentation
119
107
run : |
120
108
source activate pandas-dev
@@ -123,7 +111,7 @@ jobs:
123
111
# This can be removed when the ipython directive fails when there are errors,
124
112
# including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125
113
- name : Check ipython directive errors
126
- run : " ! grep -B1 \" ^<<<-------------------------------------------------------------------------$\" sphinx.log"
114
+ run : " ! grep -B10 \" ^<<<-------------------------------------------------------------------------$\" sphinx.log"
127
115
128
116
- name : Install ssh key
129
117
run : |
@@ -140,3 +128,38 @@ jobs:
140
128
- name : Upload dev docs
141
129
run : rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
142
130
if : github.event_name == 'push'
131
+
132
+ - name : Move docs into site directory
133
+ run : mv doc/build/html web/build/docs
134
+ - name : Save website as an artifact
135
+ uses : actions/upload-artifact@v2
136
+ with :
137
+ name : website
138
+ path : web/build
139
+ retention-days : 14
140
+
141
+ data_manager :
142
+ name : Test experimental data manager
143
+ runs-on : ubuntu-latest
144
+ strategy :
145
+ matrix :
146
+ pattern : ["not slow and not network and not clipboard", "slow"]
147
+ steps :
148
+
149
+ - name : Checkout
150
+ uses : actions/checkout@v1
151
+
152
+ - name : Set up pandas
153
+ uses : ./.github/actions/setup
154
+
155
+ - name : Run tests
156
+ env :
157
+ PANDAS_DATA_MANAGER : array
158
+ PATTERN : ${{ matrix.pattern }}
159
+ PYTEST_WORKERS : " auto"
160
+ run : |
161
+ source activate pandas-dev
162
+ ci/run_tests.sh
163
+
164
+ - name : Print skipped tests
165
+ run : python ci/print_skipped.py
0 commit comments