Skip to content

Commit 6117fad

Browse files
jonashaagyehoshuadimarsky
authored andcommitted
Use setup-conda action (pandas-dev#47293)
* Use setup-conda action * Update action.yml * Update posix.yml * Update sdist.yml * Update sdist.yml * Update sdist.yml * Update action.yml
1 parent cc918ee commit 6117fad

File tree

5 files changed

+24
-42
lines changed

5 files changed

+24
-42
lines changed

.github/actions/setup-conda/action.yml

+10-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,12 @@ inputs:
33
environment-file:
44
description: Conda environment file to use.
55
default: environment.yml
6+
environment-name:
7+
description: Name to use for the Conda environment
8+
default: test
9+
python-version:
10+
description: Python version to install
11+
required: false
612
pyarrow-version:
713
description: If set, overrides the PyArrow version in the Conda environment to the given string.
814
required: false
@@ -21,8 +27,11 @@ runs:
2127
uses: conda-incubator/[email protected]
2228
with:
2329
environment-file: ${{ inputs.environment-file }}
30+
activate-environment: ${{ inputs.environment-name }}
31+
python-version: ${{ inputs.python-version }}
2432
channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }}
2533
channels: conda-forge
26-
mamba-version: "0.23"
34+
mamba-version: "0.24"
2735
use-mamba: true
36+
use-only-tar-bz2: true
2837
condarc-file: ci/condarc.yml

.github/workflows/asv-bot.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,8 @@ jobs:
4141

4242
# Although asv sets up its own env, deps are still needed
4343
# during discovery process
44-
- uses: conda-incubator/[email protected]
45-
with:
46-
activate-environment: pandas-dev
47-
channel-priority: strict
48-
environment-file: ${{ env.ENV_FILE }}
49-
use-only-tar-bz2: true
50-
condarc-file: ci/condarc.yml
44+
- name: Set up Conda
45+
uses: ./.github/actions/setup-conda
5146

5247
- name: Run benchmarks
5348
id: bench

.github/workflows/code-checks.yml

+4-18
Original file line numberDiff line numberDiff line change
@@ -58,15 +58,8 @@ jobs:
5858
path: ~/conda_pkgs_dir
5959
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
6060

61-
- uses: conda-incubator/[email protected]
62-
with:
63-
mamba-version: "*"
64-
channels: conda-forge
65-
activate-environment: pandas-dev
66-
channel-priority: strict
67-
environment-file: ${{ env.ENV_FILE }}
68-
use-only-tar-bz2: true
69-
condarc-file: ci/condarc.yml
61+
- Name: Set up Conda
62+
uses: ./.github/actions/setup-conda
7063

7164
- name: Build Pandas
7265
id: build
@@ -128,15 +121,8 @@ jobs:
128121
path: ~/conda_pkgs_dir
129122
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
130123

131-
- uses: conda-incubator/[email protected]
132-
with:
133-
mamba-version: "*"
134-
channels: conda-forge
135-
activate-environment: pandas-dev
136-
channel-priority: strict
137-
environment-file: ${{ env.ENV_FILE }}
138-
use-only-tar-bz2: true
139-
condarc-file: ci/condarc.yml
124+
- name: Set up Conda
125+
uses: ./.github/actions/setup-conda
140126

141127
- name: Build Pandas
142128
id: build

.github/workflows/posix.yml

+3-11
Original file line numberDiff line numberDiff line change
@@ -147,19 +147,11 @@ jobs:
147147
# xsel for clipboard tests
148148
run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }}
149149

150-
- uses: conda-incubator/[email protected]
150+
- name: Set up Conda
151+
uses: ./.github/actions/setup-conda
151152
with:
152-
mamba-version: "*"
153-
channels: conda-forge
154-
activate-environment: pandas-dev
155-
channel-priority: flexible
156153
environment-file: ${{ env.ENV_FILE }}
157-
use-only-tar-bz2: true
158-
condarc-file: ci/condarc.yml
159-
160-
- name: Upgrade Arrow version
161-
run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ matrix.pyarrow_version }}
162-
if: ${{ matrix.pyarrow_version }}
154+
pyarrow-version: ${{ matrix.pyarrow_version }}
163155

164156
- name: Build Pandas
165157
uses: ./.github/actions/build_pandas

.github/workflows/sdist.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ jobs:
5959
name: ${{matrix.python-version}}-sdist.gz
6060
path: dist/*.gz
6161

62-
- uses: conda-incubator/[email protected]
62+
- name: Set up Conda
63+
uses: ./.github/actions/setup-conda
6364
with:
64-
activate-environment: pandas-sdist
65-
channels: conda-forge
66-
python-version: '${{ matrix.python-version }}'
67-
condarc-file: ci/condarc.yml
65+
environment-file: ""
66+
environment-name: pandas-sdist
67+
python-version: ${{ matrix.python-version }}
6868

6969
- name: Install pandas from sdist
7070
run: |

0 commit comments

Comments
 (0)