|
16 | 16 |
|
17 | 17 | services:
|
18 | 18 | postgres:
|
19 |
| - image: postgis/postgis:10-2.5 |
| 19 | + image: postgis/postgis:15-3.4-alpine |
20 | 20 | env:
|
21 | 21 | POSTGRES_PASSWORD: postgres
|
22 | 22 | POSTGRES_USER: postgres
|
@@ -72,54 +72,57 @@ jobs:
|
72 | 72 | - python: 3.9
|
73 | 73 | TOXENV: py39-django40-djangorestframework313
|
74 | 74 | steps:
|
75 |
| - - uses: actions/checkout@v2 |
| 75 | + - uses: actions/checkout@v4 |
76 | 76 | with:
|
77 | 77 | ref: ${{ github.event.pull_request.head.sha }}
|
78 | 78 |
|
79 | 79 | - name: Set up Python ${{ matrix.env.python }}
|
80 |
| - uses: actions/setup-python@v2 |
| 80 | + uses: actions/setup-python@v5 |
81 | 81 | with:
|
82 | 82 | python-version: ${{ matrix.env.python }}
|
| 83 | + cache: 'pip' |
| 84 | + cache-dependency-path: | |
| 85 | + **/requirements*.txt |
83 | 86 |
|
84 |
| - - name: Install system packages |
85 |
| - run: | |
86 |
| - sudo apt-get update |
87 |
| - sudo apt-get install binutils libproj-dev gdal-bin -y |
88 |
| -
|
89 |
| - - name: Install python dependencies |
| 87 | + - name: Install Dependencies |
| 88 | + id: deps |
90 | 89 | run: |
|
| 90 | + sudo apt -qq update |
| 91 | + sudo apt -qq -y install binutils libproj-dev gdal-bin |
91 | 92 | pip install -U pip wheel setuptools
|
92 | 93 | pip install -U -r requirements-test.txt
|
93 | 94 | pip install tox docutils pygments twine
|
94 | 95 |
|
| 96 | + - name: QA checks |
| 97 | + run: | |
| 98 | + ./run-qa-checks |
| 99 | +
|
95 | 100 | - name: Tests
|
| 101 | + if: ${{ !cancelled() && steps.deps.conclusion == 'success' }} |
96 | 102 | run: |
|
97 | 103 | tox -e ${{ matrix.env.TOXENV }}
|
| 104 | + coverage combine |
| 105 | + coverage xml |
98 | 106 | env:
|
99 | 107 | POSTGRES_HOST: localhost
|
100 | 108 |
|
101 | 109 | - name: Upload Coverage
|
102 |
| - run: coveralls --service=github |
103 |
| - env: |
104 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
105 |
| - COVERALLS_FLAG_NAME: | |
106 |
| - python-${{ matrix.env.env }} |
107 |
| - COVERALLS_PARALLEL: true |
| 110 | + if: ${{ success() }} |
| 111 | + uses: coverallsapp/github-action@v2 |
| 112 | + with: |
| 113 | + parallel: true |
| 114 | + format: cobertura |
| 115 | + flag-name: python-${{ matrix.env.env }} |
| 116 | + github-token: ${{ secrets.GITHUB_TOKEN }} |
| 117 | + |
| 118 | + |
108 | 119 |
|
109 |
| - - name: QA checks |
110 |
| - run: | |
111 |
| - pip install "importlib-metadata<5.0" # remove when flake8 is upgraded |
112 |
| - ./run-qa-checks |
113 | 120 |
|
114 | 121 | coveralls:
|
115 |
| - name: Finish Coveralls |
116 | 122 | needs: build
|
117 | 123 | runs-on: ubuntu-latest
|
118 |
| - container: python:3-slim |
119 | 124 | steps:
|
120 |
| - - name: Finished |
121 |
| - run: | |
122 |
| - pip3 install --upgrade coveralls |
123 |
| - coveralls --finish |
124 |
| - env: |
125 |
| - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
| 125 | + - name: Coveralls Finished |
| 126 | + uses: coverallsapp/github-action@v2 |
| 127 | + with: |
| 128 | + parallel-finished: true |
0 commit comments