diff --git a/.github/actions/setup-conda/action.yml b/.github/actions/setup-conda/action.yml index 7f5d864330db2..87a0bd2ed1715 100644 --- a/.github/actions/setup-conda/action.yml +++ b/.github/actions/setup-conda/action.yml @@ -3,6 +3,12 @@ inputs: environment-file: description: Conda environment file to use. default: environment.yml + environment-name: + description: Name to use for the Conda environment + default: test + python-version: + description: Python version to install + required: false pyarrow-version: description: If set, overrides the PyArrow version in the Conda environment to the given string. required: false @@ -21,8 +27,11 @@ runs: uses: conda-incubator/setup-miniconda@v2.1.1 with: environment-file: ${{ inputs.environment-file }} + activate-environment: ${{ inputs.environment-name }} + python-version: ${{ inputs.python-version }} channel-priority: ${{ runner.os == 'macOS' && 'flexible' || 'strict' }} channels: conda-forge - mamba-version: "0.23" + mamba-version: "0.24" use-mamba: true + use-only-tar-bz2: true condarc-file: ci/condarc.yml diff --git a/.github/workflows/asv-bot.yml b/.github/workflows/asv-bot.yml index 50720c5ebf0e2..022c12cf6ff6c 100644 --- a/.github/workflows/asv-bot.yml +++ b/.github/workflows/asv-bot.yml @@ -41,13 +41,8 @@ jobs: # Although asv sets up its own env, deps are still needed # during discovery process - - uses: conda-incubator/setup-miniconda@v2.1.1 - with: - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - condarc-file: ci/condarc.yml + - name: Set up Conda + uses: ./.github/actions/setup-conda - name: Run benchmarks id: bench diff --git a/.github/workflows/code-checks.yml b/.github/workflows/code-checks.yml index 9d51062754f35..85d8bedb95708 100644 --- a/.github/workflows/code-checks.yml +++ b/.github/workflows/code-checks.yml @@ -58,15 +58,8 @@ jobs: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }} - - uses: conda-incubator/setup-miniconda@v2.1.1 - with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - condarc-file: ci/condarc.yml + - Name: Set up Conda + uses: ./.github/actions/setup-conda - name: Build Pandas id: build @@ -128,15 +121,8 @@ jobs: path: ~/conda_pkgs_dir key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }} - - uses: conda-incubator/setup-miniconda@v2.1.1 - with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: strict - environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - condarc-file: ci/condarc.yml + - name: Set up Conda + uses: ./.github/actions/setup-conda - name: Build Pandas id: build diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml index 28d2ae6d26bda..061b2b361ca62 100644 --- a/.github/workflows/posix.yml +++ b/.github/workflows/posix.yml @@ -147,19 +147,11 @@ jobs: # xsel for clipboard tests run: sudo apt-get update && sudo apt-get install -y libc6-dev-i386 xsel ${{ env.EXTRA_APT }} - - uses: conda-incubator/setup-miniconda@v2.1.1 + - name: Set up Conda + uses: ./.github/actions/setup-conda with: - mamba-version: "*" - channels: conda-forge - activate-environment: pandas-dev - channel-priority: flexible environment-file: ${{ env.ENV_FILE }} - use-only-tar-bz2: true - condarc-file: ci/condarc.yml - - - name: Upgrade Arrow version - run: conda install -n pandas-dev -c conda-forge --no-update-deps pyarrow=${{ matrix.pyarrow_version }} - if: ${{ matrix.pyarrow_version }} + pyarrow-version: ${{ matrix.pyarrow_version }} - name: Build Pandas uses: ./.github/actions/build_pandas diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml index 82a80d5ddf8f6..5ae2280c5069f 100644 --- a/.github/workflows/sdist.yml +++ b/.github/workflows/sdist.yml @@ -59,12 +59,12 @@ jobs: name: ${{matrix.python-version}}-sdist.gz path: dist/*.gz - - uses: conda-incubator/setup-miniconda@v2.1.1 + - name: Set up Conda + uses: ./.github/actions/setup-conda with: - activate-environment: pandas-sdist - channels: conda-forge - python-version: '${{ matrix.python-version }}' - condarc-file: ci/condarc.yml + environment-file: "" + environment-name: pandas-sdist + python-version: ${{ matrix.python-version }} - name: Install pandas from sdist run: |