|
| 1 | +name: Database |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [master] |
| 6 | + pull_request: |
| 7 | + branches: |
| 8 | + - master |
| 9 | + - 1.2.x |
| 10 | + |
| 11 | +env: |
| 12 | + PYTEST_WORKERS: "auto" |
| 13 | + PANDAS_CI: 1 |
| 14 | + PATTERN: ((not slow and not network and not clipboard) or (single and db)) |
| 15 | + |
| 16 | +jobs: |
| 17 | + Linux_py37_locale: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + defaults: |
| 20 | + run: |
| 21 | + shell: bash -l {0} |
| 22 | + |
| 23 | + env: |
| 24 | + ENV_FILE: ci/deps/actions-37-locale.yaml |
| 25 | + LOCALE_OVERRIDE: zh_CN.UTF-8 |
| 26 | + |
| 27 | + services: |
| 28 | + mysql: |
| 29 | + image: mysql |
| 30 | + env: |
| 31 | + MYSQL_ALLOW_EMPTY_PASSWORD: yes |
| 32 | + MYSQL_DATABASE: pandas |
| 33 | + options: >- |
| 34 | + --health-cmd "mysqladmin ping" |
| 35 | + --health-interval 10s |
| 36 | + --health-timeout 5s |
| 37 | + --health-retries 5 |
| 38 | + ports: |
| 39 | + - 3306:3306 |
| 40 | + |
| 41 | + postgres: |
| 42 | + image: postgres |
| 43 | + env: |
| 44 | + POSTGRES_USER: postgres |
| 45 | + POSTGRES_PASSWORD: postgres |
| 46 | + POSTGRES_DB: pandas |
| 47 | + options: >- |
| 48 | + --health-cmd pg_isready |
| 49 | + --health-interval 10s |
| 50 | + --health-timeout 5s |
| 51 | + --health-retries 5 |
| 52 | + ports: |
| 53 | + - 5432:5432 |
| 54 | + |
| 55 | + steps: |
| 56 | + - name: Checkout |
| 57 | + uses: actions/checkout@v1 |
| 58 | + |
| 59 | + - name: Cache conda |
| 60 | + uses: actions/cache@v1 |
| 61 | + env: |
| 62 | + CACHE_NUMBER: 0 |
| 63 | + with: |
| 64 | + path: ~/conda_pkgs_dir |
| 65 | + key: ${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-${{ |
| 66 | + hashFiles('${{ env.ENV_FILE }}') }} |
| 67 | + |
| 68 | + - uses: conda-incubator/setup-miniconda@v2 |
| 69 | + with: |
| 70 | + activate-environment: pandas-dev |
| 71 | + channel-priority: strict |
| 72 | + environment-file: ${{ env.ENV_FILE }} |
| 73 | + use-only-tar-bz2: true |
| 74 | + |
| 75 | + - name: Environment Detail |
| 76 | + run: | |
| 77 | + conda info |
| 78 | + conda list |
| 79 | +
|
| 80 | + - name: Build Pandas |
| 81 | + run: | |
| 82 | + python setup.py build_ext -j 2 |
| 83 | + python -m pip install -e . --no-build-isolation --no-use-pep517 |
| 84 | +
|
| 85 | + - name: Test |
| 86 | + run: ci/run_tests.sh |
| 87 | + if: always() |
| 88 | + |
| 89 | + - name: Build Version |
| 90 | + run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd |
| 91 | + |
| 92 | + - name: Publish test results |
| 93 | + uses: actions/upload-artifact@master |
| 94 | + with: |
| 95 | + name: Test results |
| 96 | + path: test-data.xml |
| 97 | + if: failure() |
| 98 | + |
| 99 | + - name: Print skipped tests |
| 100 | + run: python ci/print_skipped.py |
| 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: Environment Detail |
| 162 | + run: | |
| 163 | + conda info |
| 164 | + conda list |
| 165 | +
|
| 166 | + - name: Build Pandas |
| 167 | + run: | |
| 168 | + python setup.py build_ext -j 2 |
| 169 | + python -m pip install -e . --no-build-isolation --no-use-pep517 |
| 170 | +
|
| 171 | + - name: Test |
| 172 | + run: ci/run_tests.sh |
| 173 | + if: always() |
| 174 | + |
| 175 | + - name: Build Version |
| 176 | + run: pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd |
| 177 | + |
| 178 | + - name: Publish test results |
| 179 | + uses: actions/upload-artifact@master |
| 180 | + with: |
| 181 | + name: Test results |
| 182 | + path: test-data.xml |
| 183 | + if: failure() |
| 184 | + |
| 185 | + - name: Print skipped tests |
| 186 | + run: python ci/print_skipped.py |
0 commit comments