Skip to content

Commit 5569363

Browse files
committed
CI: share pandas setup steps
1 parent 0c18cc6 commit 5569363

File tree

4 files changed

+53
-82
lines changed

4 files changed

+53
-82
lines changed

.github/actions/setup/action.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: Set up pandas
2+
description: Runs all the setup steps required to have a built pandas ready to use
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Setting conda path
7+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
8+
shell: bash -l {0}
9+
10+
- name: Setup environment and build pandas
11+
run: ci/setup_env.sh
12+
shell: bash -l {0}
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Set up pandas
2+
description: Runs all the setup steps required to have a built pandas ready to use, using the setup-miniconda action
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Cache conda
7+
uses: actions/cache@v2
8+
with:
9+
path: ~/conda_pkgs_dir
10+
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
11+
shell: bash -l {0}
12+
13+
- uses: conda-incubator/setup-miniconda@v2
14+
with:
15+
activate-environment: pandas-dev
16+
channel-priority: strict
17+
environment-file: ${{ env.ENV_FILE }}
18+
use-only-tar-bz2: true
19+
shell: bash -l {0}
20+
21+
- name: Environment Detail
22+
run: |
23+
conda info
24+
conda list
25+
shell: bash -l {0}
26+
27+
- name: Build Pandas
28+
run: |
29+
python setup.py build_ext -j 2
30+
python -m pip install -e . --no-build-isolation --no-use-pep517
31+
shell: bash -l {0}

.github/workflows/ci.yml

+6-32
Original file line numberDiff line numberDiff line change
@@ -28,28 +28,8 @@ jobs:
2828
run: ci/code_checks.sh patterns
2929
if: always()
3030

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 }}') }}
36-
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
43-
44-
- name: Environment Detail
45-
run: |
46-
conda info
47-
conda list
48-
49-
- name: Build Pandas
50-
run: |
51-
python setup.py build_ext -j 2
52-
python -m pip install -e . --no-build-isolation --no-use-pep517
31+
- name: Set up pandas
32+
uses: ./.github/actions/setup_incubator
5333

5434
- name: Linting
5535
run: ci/code_checks.sh lint
@@ -100,14 +80,11 @@ jobs:
10080
runs-on: ubuntu-latest
10181
steps:
10282

103-
- name: Setting conda path
104-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
105-
10683
- name: Checkout
10784
uses: actions/checkout@v1
10885

109-
- name: Setup environment and build pandas
110-
run: ci/setup_env.sh
86+
- name: Set up pandas
87+
uses: ./.github/actions/setup
11188

11289
- name: Build website
11390
run: |
@@ -144,14 +121,11 @@ jobs:
144121
runs-on: ubuntu-latest
145122
steps:
146123

147-
- name: Setting conda path
148-
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
149-
150124
- name: Checkout
151125
uses: actions/checkout@v1
152126

153-
- name: Setup environment and build pandas
154-
run: ci/setup_env.sh
127+
- name: Set up pandas
128+
uses: ./.github/actions/setup
155129

156130
- name: Run tests
157131
run: |

.github/workflows/database.yml

+4-50
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,8 @@ jobs:
5656
- name: Checkout
5757
uses: actions/checkout@v1
5858

59-
- name: Cache conda
60-
uses: actions/cache@v1
61-
env:
62-
CACHE_NUMBER: 0
63-
with:
64-
path: ~/conda_pkgs_dir
65-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66-
hashFiles('${{ env.ENV_FILE }}') }}
67-
68-
- uses: conda-incubator/setup-miniconda@v2
69-
with:
70-
activate-environment: pandas-dev
71-
channel-priority: strict
72-
environment-file: ${{ env.ENV_FILE }}
73-
use-only-tar-bz2: true
74-
75-
- name: Environment Detail
76-
run: |
77-
conda info
78-
conda list
79-
80-
- name: Build Pandas
81-
run: |
82-
python setup.py build_ext -j 2
83-
python -m pip install -e . --no-build-isolation --no-use-pep517
59+
- name: Set up pandas
60+
uses: ./.github/actions/setup_incubator
8461

8562
- name: Test
8663
run: ci/run_tests.sh
@@ -142,31 +119,8 @@ jobs:
142119
- name: Checkout
143120
uses: actions/checkout@v1
144121

145-
- name: Cache conda
146-
uses: actions/cache@v1
147-
env:
148-
CACHE_NUMBER: 0
149-
with:
150-
path: ~/conda_pkgs_dir
151-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
152-
hashFiles('${{ env.ENV_FILE }}') }}
153-
154-
- uses: conda-incubator/setup-miniconda@v2
155-
with:
156-
activate-environment: pandas-dev
157-
channel-priority: strict
158-
environment-file: ${{ env.ENV_FILE }}
159-
use-only-tar-bz2: true
160-
161-
- name: Environment Detail
162-
run: |
163-
conda info
164-
conda list
165-
166-
- name: Build Pandas
167-
run: |
168-
python setup.py build_ext -j 2
169-
python -m pip install -e . --no-build-isolation --no-use-pep517
122+
- name: Set up pandas
123+
uses: ./.github/actions/setup_incubator
170124

171125
- name: Test
172126
run: ci/run_tests.sh

0 commit comments

Comments
 (0)