Skip to content

Add run-tests action #47292

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 19 commits into from
Jun 14, 2022
27 changes: 27 additions & 0 deletions .github/actions/run-tests/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Run tests and report results
runs:
using: composite
steps:
- name: Test
run: ci/run_tests.sh
shell: bash -el {0}

- name: Publish test results
uses: actions/upload-artifact@v2
with:
name: Test results
path: test-data.xml
if: failure()

- name: Report Coverage
run: coverage report -m
shell: bash -el {0}
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: false
if: failure()
16 changes: 1 addition & 15 deletions .github/workflows/macos-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,4 @@ jobs:
uses: ./.github/actions/build_pandas

- name: Test
run: ci/run_tests.sh

- name: Publish test results
uses: actions/upload-artifact@v3
with:
name: Test results
path: test-data.xml
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: false
uses: ./.github/actions/run-tests
19 changes: 1 addition & 18 deletions .github/workflows/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,6 @@ jobs:
uses: ./.github/actions/build_pandas

- name: Test
run: ci/run_tests.sh
uses: ./.github/actions/run-tests
# TODO: Don't continue on error for PyPy
continue-on-error: ${{ env.IS_PYPY == 'true' }}

- name: Build Version
run: conda list

- name: Publish test results
uses: actions/upload-artifact@v3
with:
name: Test results
path: test-data.xml
if: failure()

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: false
40 changes: 10 additions & 30 deletions .github/workflows/python-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,40 +57,20 @@ jobs:
- name: Install dependencies
shell: bash -el {0}
run: |
python -m pip install --upgrade pip setuptools wheel
pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
pip install git+https://github.com/nedbat/coveragepy.git
pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov
pip list
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install -i https://pypi.anaconda.org/scipy-wheels-nightly/simple numpy
python3 -m pip install git+https://github.com/nedbat/coveragepy.git
python3 -m pip install cython python-dateutil pytz hypothesis pytest>=6.2.5 pytest-xdist pytest-cov pytest-asyncio>=0.17
python3 -m pip list

- name: Build Pandas
run: |
python setup.py build_ext -q -j2
python -m pip install -e . --no-build-isolation --no-use-pep517
python3 setup.py build_ext -q -j2
python3 -m pip install -e . --no-build-isolation --no-use-pep517

- name: Build Version
run: |
python -c "import pandas; pandas.show_versions();"
python3 -c "import pandas; pandas.show_versions();"

- name: Test with pytest
shell: bash -el {0}
run: |
ci/run_tests.sh

- name: Publish test results
uses: actions/upload-artifact@v3
with:
name: Test results
path: test-data.xml
if: failure()

- name: Report Coverage
run: |
coverage report -m

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: true
- name: Test
uses: ./.github/actions/run-tests