Skip to content

Commit 3921026

Browse files
authored
Merge branch 'main' into patch-1
2 parents a2bda47 + 3ed59cb commit 3921026

File tree

106 files changed

+3626
-2008
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3626
-2008
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
},
66
"extends": "eslint:recommended",
77
"parserOptions": {
8-
"ecmaVersion": 6
8+
"ecmaVersion": 6,
9+
"sourceType": "module"
910
},
1011
"rules": {
1112
"curly": ["error", "all"],

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
if: github.repository == 'jazzband/django-debug-toolbar'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip
26+
python -m pip install -U setuptools twine wheel
27+
28+
- name: Build package
29+
run: |
30+
python setup.py --version
31+
python setup.py sdist --format=gztar bdist_wheel
32+
twine check dist/*
33+
34+
- name: Upload packages to Jazzband
35+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: jazzband
39+
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
40+
repository_url: https://jazzband.co/projects/django-debug-toolbar/upload

.github/workflows/test.yml

Lines changed: 219 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,219 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
mysql:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
max-parallel: 5
11+
matrix:
12+
python-version: ['3.6', '3.7', '3.8', '3.9']
13+
14+
services:
15+
mariadb:
16+
image: mariadb:10.3
17+
env:
18+
MYSQL_ROOT_PASSWORD: debug_toolbar
19+
options: >-
20+
--health-cmd "mysqladmin ping"
21+
--health-interval 10s
22+
--health-timeout 5s
23+
--health-retries 5
24+
ports:
25+
- 3306:3306
26+
27+
steps:
28+
- uses: actions/checkout@v2
29+
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v2
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
35+
- name: Get pip cache dir
36+
id: pip-cache
37+
run: |
38+
echo "::set-output name=dir::$(pip cache dir)"
39+
40+
- name: Cache
41+
uses: actions/cache@v2
42+
with:
43+
path: ${{ steps.pip-cache.outputs.dir }}
44+
key:
45+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
46+
restore-keys: |
47+
${{ matrix.python-version }}-v1-
48+
49+
- name: Install enchant (only for docs)
50+
run: |
51+
sudo apt-get -qq update
52+
sudo apt-get -y install enchant
53+
54+
- name: Install dependencies
55+
run: |
56+
python -m pip install --upgrade pip
57+
python -m pip install --upgrade tox tox-gh-actions
58+
59+
- name: Test with tox
60+
run: tox
61+
env:
62+
DB_BACKEND: mysql
63+
DB_USER: root
64+
DB_PASSWORD: debug_toolbar
65+
DB_HOST: 127.0.0.1
66+
DB_PORT: 3306
67+
68+
- name: Upload coverage
69+
uses: codecov/codecov-action@v1
70+
with:
71+
name: Python ${{ matrix.python-version }}
72+
73+
postgres:
74+
runs-on: ubuntu-latest
75+
strategy:
76+
fail-fast: false
77+
max-parallel: 5
78+
matrix:
79+
python-version: ['3.6', '3.7', '3.8', '3.9']
80+
81+
services:
82+
postgres:
83+
image: 'postgres:9.5'
84+
env:
85+
POSTGRES_DB: debug_toolbar
86+
POSTGRES_USER: debug_toolbar
87+
POSTGRES_PASSWORD: debug_toolbar
88+
ports:
89+
- 5432:5432
90+
options: >-
91+
--health-cmd pg_isready
92+
--health-interval 10s
93+
--health-timeout 5s
94+
--health-retries 5
95+
96+
steps:
97+
- uses: actions/checkout@v2
98+
99+
- name: Set up Python ${{ matrix.python-version }}
100+
uses: actions/setup-python@v2
101+
with:
102+
python-version: ${{ matrix.python-version }}
103+
104+
- name: Get pip cache dir
105+
id: pip-cache
106+
run: |
107+
echo "::set-output name=dir::$(pip cache dir)"
108+
109+
- name: Cache
110+
uses: actions/cache@v2
111+
with:
112+
path: ${{ steps.pip-cache.outputs.dir }}
113+
key:
114+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
115+
restore-keys: |
116+
${{ matrix.python-version }}-v1-
117+
118+
- name: Install enchant (only for docs)
119+
run: |
120+
sudo apt-get -qq update
121+
sudo apt-get -y install enchant
122+
123+
- name: Install dependencies
124+
run: |
125+
python -m pip install --upgrade pip
126+
python -m pip install --upgrade tox tox-gh-actions
127+
128+
- name: Test with tox
129+
run: tox
130+
env:
131+
DB_BACKEND: postgresql
132+
DB_HOST: localhost
133+
DB_PORT: 5432
134+
135+
- name: Upload coverage
136+
uses: codecov/codecov-action@v1
137+
with:
138+
name: Python ${{ matrix.python-version }}
139+
140+
sqlite:
141+
runs-on: ubuntu-latest
142+
strategy:
143+
fail-fast: false
144+
max-parallel: 5
145+
matrix:
146+
python-version: ['3.6', '3.7', '3.8', '3.9']
147+
148+
steps:
149+
- uses: actions/checkout@v2
150+
151+
- name: Set up Python ${{ matrix.python-version }}
152+
uses: actions/setup-python@v2
153+
with:
154+
python-version: ${{ matrix.python-version }}
155+
156+
- name: Get pip cache dir
157+
id: pip-cache
158+
run: |
159+
echo "::set-output name=dir::$(pip cache dir)"
160+
161+
- name: Cache
162+
uses: actions/cache@v2
163+
with:
164+
path: ${{ steps.pip-cache.outputs.dir }}
165+
key:
166+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
167+
restore-keys: |
168+
${{ matrix.python-version }}-v1-
169+
170+
- name: Install dependencies
171+
run: |
172+
python -m pip install --upgrade pip
173+
python -m pip install --upgrade tox tox-gh-actions
174+
175+
- name: Test with tox
176+
run: tox
177+
env:
178+
DB_BACKEND: sqlite3
179+
DB_NAME: ":memory:"
180+
181+
- name: Upload coverage
182+
uses: codecov/codecov-action@v1
183+
with:
184+
name: Python ${{ matrix.python-version }}
185+
186+
lint:
187+
runs-on: ubuntu-latest
188+
strategy:
189+
fail-fast: false
190+
191+
steps:
192+
- uses: actions/checkout@v2
193+
194+
- name: Set up Python ${{ matrix.python-version }}
195+
uses: actions/setup-python@v2
196+
with:
197+
python-version: 3.8
198+
199+
- name: Get pip cache dir
200+
id: pip-cache
201+
run: |
202+
echo "::set-output name=dir::$(pip cache dir)"
203+
204+
- name: Cache
205+
uses: actions/cache@v2
206+
with:
207+
path: ${{ steps.pip-cache.outputs.dir }}
208+
key:
209+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.cfg') }}-${{ hashFiles('**/tox.ini') }}
210+
restore-keys: |
211+
${{ matrix.python-version }}-v1-
212+
213+
- name: Install dependencies
214+
run: |
215+
python -m pip install --upgrade pip
216+
python -m pip install --upgrade tox
217+
218+
- name: Test with tox
219+
run: tox -e docs,style,packaging

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
*.pyc
22
*.DS_Store
33
*~
4+
.idea
45
build
56
.coverage
67
dist
@@ -11,3 +12,5 @@ htmlcov
1112
.tox
1213
node_modules
1314
package-lock.json
15+
geckodriver.log
16+
coverage.xml

.travis.yml

Lines changed: 0 additions & 72 deletions
This file was deleted.

.tx/config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
host = https://www.transifex.com
33
lang_map = sr@latin:sr_Latn
44

5-
[django-debug-toolbar.master]
5+
[django-debug-toolbar.main]
66
file_filter = debug_toolbar/locale/<lang>/LC_MESSAGES/django.po
77
source_file = debug_toolbar/locale/en/LC_MESSAGES/django.po
88
source_lang = en

0 commit comments

Comments
 (0)