Skip to content

Commit 507916e

Browse files
rhblindulgens
authored andcommitted
add: github actions
1 parent f46ce91 commit 507916e

File tree

2 files changed

+67
-0
lines changed

2 files changed

+67
-0
lines changed

.github/workflows/docs.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Build docs
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-24.04
8+
steps:
9+
- uses: actions/checkout@v6.0.1
10+
11+
- name: Set up Python
12+
uses: actions/setup-python@v6.1.0
13+
with:
14+
python-version: "3.8"
15+
16+
- name: Install dependencies
17+
run: pip install sphinx
18+
19+
- name: Build docs
20+
run: cd docs && make html

.github/workflows/test.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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

Comments
 (0)