@@ -2,90 +2,90 @@ name: CI
22
33on :
44 push :
5- branches : master
5+ branches :
6+ - master
7+ - 1.3.x
68 pull_request :
7- branches : master
9+ branches :
10+ - master
11+ - 1.3.x
812
913env :
1014 ENV_FILE : environment.yml
15+ PANDAS_CI : 1
1116
1217jobs :
1318 checks :
1419 name : Checks
1520 runs-on : ubuntu-latest
16- steps :
21+ defaults :
22+ run :
23+ shell : bash -l {0}
1724
18- - name : Setting conda path
19- run : echo "::add-path::${HOME}/miniconda3/bin"
25+ concurrency :
26+ group : ${{ github.ref }}-checks
27+ cancel-in-progress : ${{github.event_name == 'pull_request'}}
2028
29+ steps :
2130 - name : Checkout
22- uses : actions/checkout@v1
31+ uses : actions/checkout@v2
32+ with :
33+ fetch-depth : 0
2334
2435 - name : Looking for unwanted patterns
2536 run : ci/code_checks.sh patterns
2637 if : always()
2738
28- - name : Setup environment and build pandas
29- run : ci/setup_env.sh
30- if : always()
39+ - name : Cache conda
40+ uses : actions/cache@v2
41+ with :
42+ path : ~/conda_pkgs_dir
43+ key : ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
3144
32- - name : Linting
33- run : |
34- source activate pandas-dev
35- ci/code_checks.sh lint
36- if : always()
45+ - uses : conda-incubator/setup-miniconda@v2
46+ with :
47+ activate-environment : pandas-dev
48+ channel-priority : strict
49+ environment-file : ${{ env.ENV_FILE }}
50+ use-only-tar-bz2 : true
3751
38- - name : Dependencies consistency
39- run : |
40- source activate pandas-dev
41- ci/code_checks.sh dependencies
52+ - name : Build Pandas
53+ uses : ./.github/actions/build_pandas
54+
55+ - name : Linting
56+ run : ci/code_checks.sh lint
4257 if : always()
4358
4459 - name : Checks on imported code
45- run : |
46- source activate pandas-dev
47- ci/code_checks.sh code
60+ run : ci/code_checks.sh code
4861 if : always()
4962
5063 - name : Running doctests
51- run : |
52- source activate pandas-dev
53- ci/code_checks.sh doctests
64+ run : ci/code_checks.sh doctests
5465 if : always()
5566
5667 - name : Docstring validation
57- run : |
58- source activate pandas-dev
59- ci/code_checks.sh docstrings
68+ run : ci/code_checks.sh docstrings
6069 if : always()
6170
6271 - name : Typing validation
63- run : |
64- source activate pandas-dev
65- ci/code_checks.sh typing
72+ run : ci/code_checks.sh typing
6673 if : always()
6774
6875 - name : Testing docstring validation script
69- run : |
70- source activate pandas-dev
71- pytest --capture=no --strict scripts
76+ run : pytest scripts
7277 if : always()
7378
7479 - name : Running benchmarks
7580 run : |
76- source activate pandas-dev
7781 cd asv_bench
7882 asv check -E existing
7983 git remote add upstream https://github.com/pandas-dev/pandas.git
8084 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"
85+ asv machine --yes
86+ asv dev | sed "/failed$/ s/^/##[error]/" | tee benchmarks.log
87+ if grep "failed" benchmarks.log > /dev/null ; then
88+ exit 1
8989 fi
9090 if : always()
9191
@@ -99,22 +99,24 @@ jobs:
9999 web_and_docs :
100100 name : Web and docs
101101 runs-on : ubuntu-latest
102- steps :
103102
104- - name : Setting conda path
105- run : echo "::set-env name=PATH::${HOME}/miniconda3/bin:${PATH}"
103+ concurrency :
104+ group : ${{ github.ref }}-web-docs
105+ cancel-in-progress : true
106106
107+ steps :
107108 - name : Checkout
108- uses : actions/checkout@v1
109+ uses : actions/checkout@v2
110+ with :
111+ fetch-depth : 0
109112
110- - name : Setup environment and build pandas
111- run : ci/setup_env.sh
113+ - name : Set up pandas
114+ uses : ./.github/actions/setup
112115
113116 - name : Build website
114117 run : |
115118 source activate pandas-dev
116119 python web/pandas_web.py web/pandas --target-path=web/build
117-
118120 - name : Build documentation
119121 run : |
120122 source activate pandas-dev
@@ -123,20 +125,60 @@ jobs:
123125 # This can be removed when the ipython directive fails when there are errors,
124126 # including the `tee sphinx.log` in te previous step (https://github.com/ipython/ipython/issues/11547)
125127 - name : Check ipython directive errors
126- run : " ! grep -B1 \" ^<<<-------------------------------------------------------------------------$\" sphinx.log"
128+ run : " ! grep -B10 \" ^<<<-------------------------------------------------------------------------$\" sphinx.log"
127129
128130 - name : Install ssh key
129131 run : |
130132 mkdir -m 700 -p ~/.ssh
131133 echo "${{ secrets.server_ssh_key }}" > ~/.ssh/id_rsa
132134 chmod 600 ~/.ssh/id_rsa
133135 echo "${{ secrets.server_ip }} ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBE1Kkopomm7FHG5enATf7SgnpICZ4W2bw+Ho+afqin+w7sMcrsa0je7sbztFAV8YchDkiBKnWTG4cRT+KZgZCaY=" > ~/.ssh/known_hosts
134- if : github.event_name == 'push'
136+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
135137
136138 - name : Upload web
137139 run : rsync -az --delete --exclude='pandas-docs' --exclude='docs' --exclude='Pandas_Cheat_Sheet*' web/build/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas
138- if : github.event_name == 'push'
140+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
139141
140142 - name : Upload dev docs
141143 run : rsync -az --delete doc/build/html/ docs@${{ secrets.server_ip }}:/usr/share/nginx/pandas/pandas-docs/dev
142- if : github.event_name == 'push'
144+ if : ${{github.event_name == 'push' && github.ref == 'refs/heads/master'}}
145+
146+ - name : Move docs into site directory
147+ run : mv doc/build/html web/build/docs
148+ - name : Save website as an artifact
149+ uses : actions/upload-artifact@v2
150+ with :
151+ name : website
152+ path : web/build
153+ retention-days : 14
154+
155+ data_manager :
156+ name : Test experimental data manager
157+ runs-on : ubuntu-latest
158+ strategy :
159+ matrix :
160+ pattern : ["not slow and not network and not clipboard", "slow"]
161+ concurrency :
162+ group : ${{ github.ref }}-data_manager-${{ matrix.pattern }}
163+ cancel-in-progress : true
164+
165+ steps :
166+ - name : Checkout
167+ uses : actions/checkout@v2
168+ with :
169+ fetch-depth : 0
170+
171+ - name : Set up pandas
172+ uses : ./.github/actions/setup
173+
174+ - name : Run tests
175+ env :
176+ PANDAS_DATA_MANAGER : array
177+ PATTERN : ${{ matrix.pattern }}
178+ PYTEST_WORKERS : " auto"
179+ run : |
180+ source activate pandas-dev
181+ ci/run_tests.sh
182+
183+ - name : Print skipped tests
184+ run : python ci/print_skipped.py
0 commit comments