diff --git a/.github/workflows/database.yml b/.github/workflows/database.yml index a30dbc048c03d..ba5a0a1fd0909 100644 --- a/.github/workflows/database.yml +++ b/.github/workflows/database.yml @@ -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: @@ -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 diff --git a/ci/deps/actions-37-locale.yaml b/ci/deps/actions-37-db-min.yaml similarity index 97% rename from ci/deps/actions-37-locale.yaml rename to ci/deps/actions-37-db-min.yaml index 551308f1d5fac..1d3794576220a 100644 --- a/ci/deps/actions-37-locale.yaml +++ b/ci/deps/actions-37-db-min.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 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