Skip to content

Commit f66f7e3

Browse files
committed
Simplify
1 parent fda76fe commit f66f7e3

File tree

5 files changed

+39
-54
lines changed

5 files changed

+39
-54
lines changed

.circleci/config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
PANDAS_CI: "1"
1414
steps:
1515
- checkout
16-
- run: .circleci/setup_env.sh
16+
- run: ci/setup_env.sh
1717
- run: PATH=$HOME/miniconda3/envs/pandas-dev/bin:$HOME/miniconda3/condabin:$PATH ci/run_tests.sh
1818

1919
workflows:
+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
3+
inputs:
4+
environment-file:
5+
default: environment.yml
6+
pyarrow-version:
7+
required: false
8+
runs:
9+
using: composite
10+
steps:
11+
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
12+
run: |
13+
grep -q ' - pyarrow' ${{ inputs.environment-file }}
14+
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
15+
cat ${{ inputs.environment-file }}
16+
shell: bash
17+
if: ${{ inputs.pyarrow-version }}
18+
19+
- name: Pin setuptools (GH#44980)
20+
run: |
21+
echo ' - setuptools <60' >> ${{ inputs.environment-file }}
22+
shell: bash
23+
24+
- name: Install ${{ inputs.environment-file }}
25+
uses: conda-incubator/setup-miniconda@v2
26+
with:
27+
environment-file: ${{ inputs.environment-file }}
28+
channel-priority: strict
29+
channels: conda-forge
30+
mamba-version: "0.22"
31+
use-mamba: true

.github/actions/setup/action.yml

+6-52
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,12 @@
11
name: Set up pandas
22
description: Runs all the setup steps required to have a built pandas ready to use
3-
inputs:
4-
environment-file:
5-
default: environment.yml
6-
pyarrow-version:
7-
required: false
8-
is-pypy:
9-
default: false
10-
environment-name:
11-
default: pandas-dev
12-
python-version:
13-
required: false
143
runs:
154
using: composite
165
steps:
17-
- name: Set Arrow version in ${{ inputs.environment-file }} to ${{ inputs.pyarrow-version }}
18-
run: |
19-
grep -q ' - pyarrow' ${{ inputs.environment-file }}
20-
sed -i"" -e "s/ - pyarrow/ - pyarrow=${{ inputs.pyarrow-version }}/" ${{ inputs.environment-file }}
21-
cat ${{ inputs.environment-file }}
22-
shell: bash
23-
if: ${{ inputs.pyarrow-version }}
6+
- name: Setting conda path
7+
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
8+
shell: bash -el {0}
249

25-
- name: Set Python version in ${{ inputs.environment-file }} to ${{ inputs.python-version }}
26-
run: |
27-
echo " - python=${{ inputs.pyarrow-version }}" >> ${{ inputs.environment-file }}
28-
cat ${{ inputs.environment-file }}
29-
shell: bash
30-
if: ${{ inputs.python-version }}
31-
32-
- name: Pin setuptools (GH#44980)
33-
run: |
34-
echo ' - setuptools <60' >> ${{ inputs.environment-file }}
35-
shell: bash
36-
37-
- name: Install ${{ inputs.environment-file }} (Python ${{ inputs.python-version }})
38-
uses: conda-incubator/setup-miniconda@v2
39-
with:
40-
activate-environment: ${{ inputs.environment-name }}
41-
environment-file: ${{ inputs.environment-file }}
42-
channel-priority: strict
43-
channels: conda-forge
44-
mamba-version: "0.22"
45-
use-mamba: true
46-
if: ${{ inputs.is-pypy == 'false' }} # No pypy3.8 support
47-
48-
- name: Setup PyPy
49-
uses: actions/setup-python@v3
50-
with:
51-
python-version: "pypy-3.8"
52-
if: ${{ inputs.is-pypy == 'true' }}
53-
54-
- name: Setup PyPy dependencies
55-
# TODO: re-enable cov, its slowing the tests down though
56-
run: pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3 pytest-asyncio>=0.17
57-
shell: bash
58-
if: ${{ inputs.is-pypy == 'true' }}
10+
- name: Setup environment and build pandas
11+
run: ci/setup_env.sh
12+
shell: bash -el {0}

.github/workflows/macos-windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
if: ${{ runner.os == 'Windows' }}
4949

5050
- name: Set up Conda (${{ matrix.env_file }}, Arrow ${{ matrix.pyarrow_version}})
51-
uses: ./.github/actions/setup
51+
uses: ./.github/actions/setup-pandas
5252
with:
5353
environment-file: ci/deps/${{ matrix.env_file }}
5454
pyarrow-version: ${{ matrix.pyarrow_version }}
File renamed without changes.

0 commit comments

Comments
 (0)