Skip to content

Commit

Permalink
CI: share pandas setup steps
Browse files Browse the repository at this point in the history
  • Loading branch information
afeld committed Feb 11, 2021
1 parent 0c18cc6 commit 5569363
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 82 deletions.
12 changes: 12 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Set up pandas
description: Runs all the setup steps required to have a built pandas ready to use
runs:
using: composite
steps:
- name: Setting conda path
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH
shell: bash -l {0}

- name: Setup environment and build pandas
run: ci/setup_env.sh
shell: bash -l {0}
31 changes: 31 additions & 0 deletions .github/actions/setup_incubator/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Set up pandas
description: Runs all the setup steps required to have a built pandas ready to use, using the setup-miniconda action
runs:
using: composite
steps:
- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}
shell: bash -l {0}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true
shell: bash -l {0}

- name: Environment Detail
run: |
conda info
conda list
shell: bash -l {0}

- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517
shell: bash -l {0}
38 changes: 6 additions & 32 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,8 @@ jobs:
run: ci/code_checks.sh patterns
if: always()

- name: Cache conda
uses: actions/cache@v2
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true

- name: Environment Detail
run: |
conda info
conda list
- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517
- name: Set up pandas
uses: ./.github/actions/setup_incubator

- name: Linting
run: ci/code_checks.sh lint
Expand Down Expand Up @@ -100,14 +80,11 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v1

- name: Setup environment and build pandas
run: ci/setup_env.sh
- name: Set up pandas
uses: ./.github/actions/setup

- name: Build website
run: |
Expand Down Expand Up @@ -144,14 +121,11 @@ jobs:
runs-on: ubuntu-latest
steps:

- name: Setting conda path
run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH

- name: Checkout
uses: actions/checkout@v1

- name: Setup environment and build pandas
run: ci/setup_env.sh
- name: Set up pandas
uses: ./.github/actions/setup

- name: Run tests
run: |
Expand Down
54 changes: 4 additions & 50 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true

- name: Environment Detail
run: |
conda info
conda list
- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517
- name: Set up pandas
uses: ./.github/actions/setup_incubator

- name: Test
run: ci/run_tests.sh
Expand Down Expand Up @@ -142,31 +119,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v1

- name: Cache conda
uses: actions/cache@v1
env:
CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('${{ env.ENV_FILE }}') }}

- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: pandas-dev
channel-priority: strict
environment-file: ${{ env.ENV_FILE }}
use-only-tar-bz2: true

- name: Environment Detail
run: |
conda info
conda list
- name: Build Pandas
run: |
python setup.py build_ext -j 2
python -m pip install -e . --no-build-isolation --no-use-pep517
- name: Set up pandas
uses: ./.github/actions/setup_incubator

- name: Test
run: ci/run_tests.sh
Expand Down

0 comments on commit 5569363

Please sign in to comment.