From 5f71c95cad817e9df33b857eac8b81207fc4367a Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 21 Jun 2021 08:03:11 -0500 Subject: [PATCH] Backport PR #41685: CI: add sdist release workflow --- .github/workflows/sdist.yml | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .github/workflows/sdist.yml diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml new file mode 100644 index 0000000000000..0c2e30a74bbdb --- /dev/null +++ b/.github/workflows/sdist.yml @@ -0,0 +1,64 @@ +name: sdist + +on: + push: + branches: + - master + pull_request: + branches: + - master + - 1.2.x + - 1.3.x + paths-ignore: + - "doc/**" + +jobs: + build: + runs-on: ubuntu-latest + timeout-minutes: 60 + defaults: + run: + shell: bash -l {0} + + strategy: + fail-fast: false + matrix: + python-version: ["3.7", "3.8", "3.9"] + + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install dependencies + run: | + python -m pip install --upgrade pip setuptools wheel + + # GH 39416 + pip install numpy + + - name: Build pandas sdist + run: | + pip list + python setup.py sdist --formats=gztar + + - uses: conda-incubator/setup-miniconda@v2 + with: + activate-environment: pandas-sdist + python-version: ${{ matrix.python-version }} + + - name: Install pandas from sdist + run: | + conda list + python -m pip install dist/*.gz + + - name: Import pandas + run: | + cd .. + conda list + python -c "import pandas; pandas.show_versions();"