Skip to content

CI: run database tests only #39550 #39666

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 8 commits into from
Mar 19, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
102 changes: 9 additions & 93 deletions .github/workflows/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,19 @@ env:
PYTEST_WORKERS: "auto"
PANDAS_CI: 1
PATTERN: ((not slow and not network and not clipboard) or (single and db))
COVERAGE: true

jobs:
Linux_py37_locale:
Linux_py37_IO:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

env:
ENV_FILE: ci/deps/actions-37-locale.yaml
LOCALE_OVERRIDE: zh_CN.UTF-8
strategy:
matrix:
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
fail-fast: false

services:
mysql:
Expand Down Expand Up @@ -63,106 +65,20 @@ jobs:
with:
path: ~/conda_pkgs_dir
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
hashFiles('${{ env.ENV_FILE }}') }}
hashFiles('${{ matrix.ENV_FILE }}') }}

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

- name: Build Pandas
uses: ./.github/actions/build_pandas

- name: Test
run: ci/run_tests.sh
if: always()

- name: Build Version
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd

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

- name: Print skipped tests
run: python ci/print_skipped.py

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: unittests
name: codecov-pandas
fail_ci_if_error: false

Linux_py37_cov:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}

env:
ENV_FILE: ci/deps/actions-37-cov.yaml
PANDAS_TESTING_MODE: deprecate
COVERAGE: true

services:
mysql:
image: mysql
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: pandas
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 3306:3306

postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pandas
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432

steps:
- 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: Build Pandas
uses: ./.github/actions/build_pandas

- name: Test
run: ci/run_tests.sh
run: pytest -m "${{ env.PATTERN }}" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io
if: always()

- name: Build Version
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ dependencies:
# tools
- cython>=0.29.21
- pytest>=5.0.1
- pytest-cov
- pytest-xdist>=1.21
- hypothesis>=3.58.0

Expand Down
File renamed without changes.