Skip to content

Commit 2b9ad6f

Browse files
authored
CI: run database tests only #39550 (#39666)
1 parent 00a6224 commit 2b9ad6f

File tree

3 files changed

+10
-93
lines changed

3 files changed

+10
-93
lines changed

.github/workflows/database.yml

+9-93
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,19 @@ env:
1212
PYTEST_WORKERS: "auto"
1313
PANDAS_CI: 1
1414
PATTERN: ((not slow and not network and not clipboard) or (single and db))
15+
COVERAGE: true
1516

1617
jobs:
17-
Linux_py37_locale:
18+
Linux_py37_IO:
1819
runs-on: ubuntu-latest
1920
defaults:
2021
run:
2122
shell: bash -l {0}
2223

23-
env:
24-
ENV_FILE: ci/deps/actions-37-locale.yaml
25-
LOCALE_OVERRIDE: zh_CN.UTF-8
24+
strategy:
25+
matrix:
26+
ENV_FILE: [ci/deps/actions-37-db-min.yaml, ci/deps/actions-37-db.yaml]
27+
fail-fast: false
2628

2729
services:
2830
mysql:
@@ -63,106 +65,20 @@ jobs:
6365
with:
6466
path: ~/conda_pkgs_dir
6567
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
66-
hashFiles('${{ env.ENV_FILE }}') }}
68+
hashFiles('${{ matrix.ENV_FILE }}') }}
6769

6870
- uses: conda-incubator/setup-miniconda@v2
6971
with:
7072
activate-environment: pandas-dev
7173
channel-priority: strict
72-
environment-file: ${{ env.ENV_FILE }}
74+
environment-file: ${{ matrix.ENV_FILE }}
7375
use-only-tar-bz2: true
7476

7577
- name: Build Pandas
7678
uses: ./.github/actions/build_pandas
7779

7880
- name: Test
79-
run: ci/run_tests.sh
80-
if: always()
81-
82-
- name: Build Version
83-
run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
84-
85-
- name: Publish test results
86-
uses: actions/upload-artifact@master
87-
with:
88-
name: Test results
89-
path: test-data.xml
90-
if: failure()
91-
92-
- name: Print skipped tests
93-
run: python ci/print_skipped.py
94-
95-
- name: Upload coverage to Codecov
96-
uses: codecov/codecov-action@v1
97-
with:
98-
flags: unittests
99-
name: codecov-pandas
100-
fail_ci_if_error: false
101-
102-
Linux_py37_cov:
103-
runs-on: ubuntu-latest
104-
defaults:
105-
run:
106-
shell: bash -l {0}
107-
108-
env:
109-
ENV_FILE: ci/deps/actions-37-cov.yaml
110-
PANDAS_TESTING_MODE: deprecate
111-
COVERAGE: true
112-
113-
services:
114-
mysql:
115-
image: mysql
116-
env:
117-
MYSQL_ALLOW_EMPTY_PASSWORD: yes
118-
MYSQL_DATABASE: pandas
119-
options: >-
120-
--health-cmd "mysqladmin ping"
121-
--health-interval 10s
122-
--health-timeout 5s
123-
--health-retries 5
124-
ports:
125-
- 3306:3306
126-
127-
postgres:
128-
image: postgres
129-
env:
130-
POSTGRES_USER: postgres
131-
POSTGRES_PASSWORD: postgres
132-
POSTGRES_DB: pandas
133-
options: >-
134-
--health-cmd pg_isready
135-
--health-interval 10s
136-
--health-timeout 5s
137-
--health-retries 5
138-
ports:
139-
- 5432:5432
140-
141-
steps:
142-
- name: Checkout
143-
uses: actions/checkout@v1
144-
145-
- name: Cache conda
146-
uses: actions/cache@v1
147-
env:
148-
CACHE_NUMBER: 0
149-
with:
150-
path: ~/conda_pkgs_dir
151-
key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{
152-
hashFiles('${{ env.ENV_FILE }}') }}
153-
154-
- uses: conda-incubator/setup-miniconda@v2
155-
with:
156-
activate-environment: pandas-dev
157-
channel-priority: strict
158-
environment-file: ${{ env.ENV_FILE }}
159-
use-only-tar-bz2: true
160-
161-
- name: Build Pandas
162-
uses: ./.github/actions/build_pandas
163-
164-
- name: Test
165-
run: ci/run_tests.sh
81+
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
16682
if: always()
16783

16884
- name: Build Version

ci/deps/actions-37-locale.yaml renamed to ci/deps/actions-37-db-min.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ dependencies:
77
# tools
88
- cython>=0.29.21
99
- pytest>=5.0.1
10+
- pytest-cov
1011
- pytest-xdist>=1.21
1112
- hypothesis>=3.58.0
1213

File renamed without changes.

0 commit comments

Comments
 (0)