-
Notifications
You must be signed in to change notification settings - Fork 246
80 lines (80 loc) · 2.12 KB
/
ci.yml
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
name: CI
on:
push:
branches:
- "*"
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
test:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-22.04]
runs-on: ${{ matrix.os }}
name: "${{ matrix.os }} Python: ${{ matrix.python-version }}"
services:
redis:
image: redis:6.2.6
ports:
- 6379:6379
memcached:
image: memcached:1.6.12
ports:
- 11211:11211
mysql:
image: mysql:8.0.27
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
postgresql:
image: postgis/postgis:14-master
env:
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- 5432:5432
steps:
- name: Install OS Packages
run: |
sudo apt-get update
sudo apt-get install binutils libproj-dev gdal-bin libmemcached-dev
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U "pip>=23.1.1"
pip install -U "tox-gh-actions==3.1.0" coverage
- name: Log versions
run: |
python --version
pip --version
psql -V
mysql -V
- name: prep DB
env:
MYSQL_TCP_PORT: 3306
MYSQL_HOST: localhost
PGHOST: localhost
PGPORT: 5432
run: |
psql -U postgres -c 'CREATE DATABASE postgis'
psql -U postgres postgis -c 'CREATE EXTENSION IF NOT EXISTS postgis;'
mysql --protocol=TCP --user=root -e 'create database django_prometheus_1;'
- name: Run test and linters via Tox
run: tox
- name: Process code coverage
run: |
coverage combine .coverage django_prometheus/tests/end2end/.coverage
coverage xml