|  | 
| 1 | 1 | name: Set up pandas | 
| 2 | 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 | +  is-pypy: | 
|  | 9 | +    default: false | 
|  | 10 | +  environment-name: | 
|  | 11 | +    default: pandas-dev | 
|  | 12 | +  python-version: | 
|  | 13 | +    required: false | 
| 3 | 14 | runs: | 
| 4 | 15 |   using: composite | 
| 5 | 16 |   steps: | 
| 6 |  | -    - name: Setting conda path | 
| 7 |  | -      run: echo "${HOME}/miniconda3/bin" >> $GITHUB_PATH | 
| 8 |  | -      shell: bash -l {0} | 
|  | 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 }} | 
| 9 | 24 | 
 | 
| 10 |  | -    - name: Setup environment and build pandas | 
| 11 |  | -      run: ci/setup_env.sh | 
| 12 |  | -      shell: bash -l {0} | 
|  | 25 | +    - name: Pin setuptools (GH#44980) | 
|  | 26 | +      run: | | 
|  | 27 | +        echo '  - setuptools <60' >> ${{ inputs.environment-file }} | 
|  | 28 | +      shell: bash | 
|  | 29 | + | 
|  | 30 | +    - name: Install ${{ inputs.environment-file }} (Python ${{ inputs.python-version }}) | 
|  | 31 | +      uses: mamba-org/provision-with-micromamba@main | 
|  | 32 | +      with: | 
|  | 33 | +        environment-name: ${{ inputs.environment-name }} | 
|  | 34 | +        environment-file: ${{ inputs.environment-file }} | 
|  | 35 | +        extra-specs: | | 
|  | 36 | +          ${{ inputs.python-version && format('python={0}', inputs.python-version) }} | 
|  | 37 | +        cache-env: true | 
|  | 38 | +      if: ${{ inputs.is-pypy == 'false' }} # No pypy3.8 support | 
|  | 39 | + | 
|  | 40 | +    - name: Setup PyPy | 
|  | 41 | +      uses: actions/setup-python@v3 | 
|  | 42 | +      with: | 
|  | 43 | +        python-version: "pypy-3.8" | 
|  | 44 | +      if: ${{ inputs.is-pypy == 'true' }} | 
|  | 45 | + | 
|  | 46 | +    - name: Setup PyPy dependencies | 
|  | 47 | +      # TODO: re-enable cov, its slowing the tests down though | 
|  | 48 | +      run: pip install Cython numpy python-dateutil pytz pytest>=6.0 pytest-xdist>=1.31.0 hypothesis>=5.5.3 pytest-asyncio>=0.17 | 
|  | 49 | +      shell: bash | 
|  | 50 | +      if: ${{ inputs.is-pypy == 'true' }} | 
0 commit comments