File: tests.yaml

package info (click to toggle)
python-geopandas 1.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,748 kB
  • sloc: python: 26,450; makefile: 147; sh: 25
file content (101 lines) | stat: -rw-r--r-- 3,166 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: Tests

on:
  push:
    branches: [main, 0.**, 1.**]
  pull_request:
    branches: [main, 0.**, 1.**]
  schedule:
    - cron: "0 0 * * *"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  Test:
    name: ${{ matrix.os }}, ${{ matrix.env }}
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: bash -l {0}
    # skip scheduled runs on forks
    if: (github.event_name == 'schedule' && github.repository == 'geopandas/geopandas') || (github.event_name != 'schedule')
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        postgis: [false]
        dev: [false]
        env:
          - ci/envs/310-minimal.yaml
          - ci/envs/310-no-optional-deps.yaml
          - ci/envs/310-pd21.yaml
          - ci/envs/310-latest-no-pyogrio.yaml
          - ci/envs/311-pd22.yaml
          - ci/envs/311-latest.yaml
          - ci/envs/312-latest.yaml
          - ci/envs/312-latest-no-pyproj.yaml
          - ci/envs/313-latest.yaml
          - ci/envs/314-latest.yaml
        include:
          - env: ci/envs/310-latest-no-pyogrio.yaml
            os: macos-latest
            postgis: false
            dev: false
          - env: ci/envs/311-latest.yaml
            os: macos-latest
            postgis: false
            dev: false
          - env: ci/envs/310-latest-no-pyogrio.yaml
            os: windows-latest
            postgis: false
            dev: false
          - env: ci/envs/311-latest.yaml
            os: windows-latest
            postgis: false
            dev: false
          - env: ci/envs/312-dev.yaml
            os: ubuntu-latest
            dev: true

    steps:
      - uses: actions/checkout@v4

      - name: Install Conda environment with Micromamba
        uses: mamba-org/setup-micromamba@v2
        with:
          environment-file: ${{ matrix.env }}

      - name: Check and Log Environment
        run: |
          python -V
          python -c "import geopandas; geopandas.show_versions();"
          micromamba info
          micromamba list

      - name: Test
        run: |
          pytest -v -r a -n auto --color=yes --cov=geopandas --cov-append --cov-report term-missing --cov-report xml geopandas/

      - name: Test with PostGIS
        if:
          (contains(matrix.env, '311-pd22.yaml') || contains(matrix.env, '312-latest.yaml'))
          && contains(matrix.os, 'ubuntu')
        env:
          PGUSER: postgres
          PGPASSWORD: postgres
          PGHOST: "127.0.0.1"
          PGPORT: 5432
        run: |
          conda install postgis -c conda-forge
          sh ci/scripts/setup_postgres.sh
          set -o pipefail
          pytest -v -r a --color=yes --cov=geopandas --cov-append --cov-report term-missing --cov-report xml geopandas/io/tests/test_sql.py | tee /dev/stderr | if grep SKIPPED >/dev/null;then echo "TESTS SKIPPED, FAILING" && exit 1;fi

      - name: Test docstrings
        if: contains(matrix.env, '311-pd22.yaml') && contains(matrix.os, 'ubuntu')
        run: |
          pytest -v --color=yes --doctest-only geopandas --ignore=geopandas/datasets

      - uses: codecov/codecov-action@v5