|
| 1 | +name: Test |
| 2 | + |
| 3 | +on: [pull_request, push] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + runs-on: ubuntu-latest |
| 8 | + strategy: |
| 9 | + fail-fast: false |
| 10 | + matrix: # https://docs.djangoproject.com/en/4.2/faq/install |
| 11 | + django-version: ["3.2", "4.0", "4.1", "4.2"] |
| 12 | + python-version: ["3.8", "3.9", "3.10"] |
| 13 | + elastic-version: ["1.7", "2.4", "5.5", "7.13.1"] |
| 14 | + include: |
| 15 | + - django-version: "4.1" |
| 16 | + python-version: "3.11" |
| 17 | + elastic-version: "7.13.1" |
| 18 | + services: |
| 19 | + elastic: |
| 20 | + image: elasticsearch:${{ matrix.elastic-version }} |
| 21 | + env: |
| 22 | + discovery.type: "single-node" |
| 23 | + options: >- |
| 24 | + --health-cmd "curl http://localhost:9200/_cluster/health" |
| 25 | + --health-interval 10s |
| 26 | + --health-timeout 5s |
| 27 | + --health-retries 10 |
| 28 | + ports: |
| 29 | + - 9200:9200 |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v6.0.1 |
| 32 | + - name: Set up Python ${{ matrix.python-version }} |
| 33 | + uses: actions/setup-python@v6.1.0 |
| 34 | + with: |
| 35 | + python-version: ${{ matrix.python-version }} |
| 36 | + - name: Install system dependencies |
| 37 | + run: sudo apt install --no-install-recommends -y gdal-bin |
| 38 | + - name: Install dependencies |
| 39 | + run: | |
| 40 | + python -m pip install --upgrade pip setuptools wheel |
| 41 | + pip install coverage requests tox tox-gh-actions |
| 42 | + pip install django==${{ matrix.django-version }} elasticsearch==${{ matrix.elastic-version }} |
| 43 | + python setup.py clean build install |
| 44 | + - name: Run test |
| 45 | + run: tox -v |
| 46 | + env: |
| 47 | + DJANGO: ${{ matrix.django-version }} |
0 commit comments