From 652b84271c75481f022a38ff5f9f80b7af415b65 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Mon, 8 Feb 2021 01:00:00 -0600 Subject: [PATCH 1/7] run database tests only #39550 --- .github/workflows/database.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index c2f332cc5454a..b023be898e75c 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -83,7 +83,7 @@ jobs: python -m pip install -e . --no-build-isolation --no-use-pep517 - name: Test - run: ci/run_tests.sh + run: pytest -m "(single and db)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas/tests/io/test_sql.py if: always() - name: Build Version From 53d39493824eadc02564cf413c0d63de586f0be8 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 11:56:58 -0500 Subject: [PATCH 2/7] CI: remove cov build, run db only --- .github/workflows/database.yml | 87 +--------------------------------- 1 file changed, 1 insertion(+), 86 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 72e8744a86b18..35d3da63f1a03 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -23,6 +23,7 @@ jobs: env: ENV_FILE: ci/deps/actions-37-locale.yaml LOCALE_OVERRIDE: zh_CN.UTF-8 + COVERAGE: true services: mysql: @@ -98,89 +99,3 @@ jobs: 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 - 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: true From 098b1e73733afba8b0a56586fa56fff10f0b4f1c Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 12:20:45 -0500 Subject: [PATCH 3/7] fix cov --- .github/workflows/database.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 35d3da63f1a03..277b50e4ac5c9 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -77,7 +77,7 @@ jobs: uses: ./.github/actions/build_pandas - name: Test - run: pytest -m "(single and db)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml pandas/tests/io/test_sql.py + run: pytest -m "(single and db)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io/test_sql.py if: always() - name: Build Version @@ -98,4 +98,4 @@ jobs: with: flags: unittests name: codecov-pandas - fail_ci_if_error: false + fail_ci_if_error: true From b1943f04e78e6de0c81c5825da617ed0b4a7a298 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 12:38:34 -0500 Subject: [PATCH 4/7] add pytest-cov --- ci/deps/actions-37-locale.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/deps/actions-37-locale.yaml b/ci/deps/actions-37-locale.yaml index 551308f1d5fac..1d3794576220a 100644 --- a/ci/deps/actions-37-locale.yaml +++ b/ci/deps/actions-37-locale.yaml @@ -7,6 +7,7 @@ dependencies: # tools - cython>=0.29.21 - pytest>=5.0.1 + - pytest-cov - pytest-xdist>=1.21 - hypothesis>=3.58.0 From 973dea896df9bc79b7840a4d6ceaced1b256d243 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 13:55:56 -0500 Subject: [PATCH 5/7] run all io tests --- .github/workflows/database.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index 277b50e4ac5c9..fa0fbd472198a 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -20,8 +20,12 @@ jobs: run: shell: bash -l {0} + strategy: + matrix: + ENV_FILE: [ci/deps/actions-37-locale.yaml, ci/deps/actions-37-cov.yaml] + fail-fast: false + env: - ENV_FILE: ci/deps/actions-37-locale.yaml LOCALE_OVERRIDE: zh_CN.UTF-8 COVERAGE: true @@ -77,7 +81,7 @@ jobs: uses: ./.github/actions/build_pandas - name: Test - run: pytest -m "(single and db)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io/test_sql.py + run: pytest -m "(single and db)" -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 From e2334ee9f249493602b78e012af6d63c1b3b0ae7 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 14:10:18 -0500 Subject: [PATCH 6/7] fix ci typo --- .github/workflows/database.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index fa0fbd472198a..de2888f26e5a1 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -68,13 +68,13 @@ 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 From a8df702960f31ccd2a9f48b22a44ea4547eacf90 Mon Sep 17 00:00:00 2001 From: Fangchen Li Date: Thu, 18 Mar 2021 15:48:10 -0500 Subject: [PATCH 7/7] fix pattern, rename env file --- .github/workflows/database.yml | 11 ++++------- ...{actions-37-locale.yaml => actions-37-db-min.yaml} | 0 ci/deps/{actions-37-cov.yaml => actions-37-db.yaml} | 0 3 files changed, 4 insertions(+), 7 deletions(-) rename ci/deps/{actions-37-locale.yaml => actions-37-db-min.yaml} (100%) rename ci/deps/{actions-37-cov.yaml => actions-37-db.yaml} (100%) diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index de2888f26e5a1..ba5a0a1fd0909 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -12,9 +12,10 @@ 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: @@ -22,13 +23,9 @@ jobs: strategy: matrix: - ENV_FILE: [ci/deps/actions-37-locale.yaml, ci/deps/actions-37-cov.yaml] + ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml] fail-fast: false - env: - LOCALE_OVERRIDE: zh_CN.UTF-8 - COVERAGE: true - services: mysql: image: mysql @@ -81,7 +78,7 @@ jobs: uses: ./.github/actions/build_pandas - name: Test - run: pytest -m "(single and db)" -n 2 --dist=loadfile -s --strict-markers --durations=30 --junitxml=test-data.xml -s --cov=pandas --cov-report=xml pandas/tests/io + 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 diff --git a/ci/deps/actions-37-locale.yaml b/ci/deps/actions-37-db-min.yaml similarity index 100% rename from ci/deps/actions-37-locale.yaml rename to ci/deps/actions-37-db-min.yaml diff --git a/ci/deps/actions-37-cov.yaml b/ci/deps/actions-37-db.yaml similarity index 100% rename from ci/deps/actions-37-cov.yaml rename to ci/deps/actions-37-db.yaml