Skip to content

Commit c8e1502

Browse files
committed
Merge branch 'master' into allow-runtime-settings-overrides
2 parents 5f5acbe + 05436d5 commit c8e1502

File tree

6 files changed

+628
-593
lines changed

6 files changed

+628
-593
lines changed

.circleci/config.yml

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

.github/workflows/check.yml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: Check
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
test:
8+
name: Test
9+
runs-on: ubuntu-latest
10+
11+
strategy:
12+
matrix:
13+
python-version: ["3.8", "3.9", "3.10", "3.11"]
14+
django-version: ["3.2", "4.0", "4.1"]
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Set up Poetry
21+
run: pipx install poetry==1.3.2
22+
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
cache: poetry
28+
29+
- name: Set up dependencies
30+
run: |
31+
poetry install
32+
poetry run pip install "django~=${{ matrix.django-version }}.0"
33+
34+
- name: Run tests
35+
run: poetry run ./runtests
36+
37+
lint:
38+
name: Lint
39+
runs-on: ubuntu-latest
40+
41+
strategy:
42+
matrix:
43+
python-version: ["3.8", "3.11"]
44+
django-version: ["3.2", "4.1"]
45+
46+
steps:
47+
- name: Checkout
48+
uses: actions/checkout@v3
49+
50+
- name: Set up Poetry
51+
run: pipx install poetry==1.3.2
52+
53+
- name: Set up Python ${{ matrix.python-version }}
54+
uses: actions/setup-python@v4
55+
with:
56+
python-version: ${{ matrix.python-version }}
57+
cache: poetry
58+
59+
- name: Set up dependencies
60+
run: |
61+
poetry install
62+
poetry run pip install "django~=${{ matrix.django-version }}.0"
63+
64+
- name: Run linters
65+
run: poetry run flake8 --jobs=auto --format=github
66+
67+
type-check:
68+
name: Type Check
69+
runs-on: ubuntu-latest
70+
71+
strategy:
72+
matrix:
73+
python-version: ["3.8", "3.11"]
74+
django-version: ["3.2", "4.1"]
75+
76+
steps:
77+
- name: Checkout
78+
uses: actions/checkout@v3
79+
80+
- name: Set up Poetry
81+
run: pipx install poetry==1.3.2
82+
83+
- name: Set up Python ${{ matrix.python-version }}
84+
uses: actions/setup-python@v4
85+
with:
86+
python-version: ${{ matrix.python-version }}
87+
cache: poetry
88+
89+
- name: Set up dependencies
90+
run: |
91+
poetry install
92+
poetry run pip install "django~=${{ matrix.django-version }}.0"
93+
94+
- name: Run type checking
95+
run: poetry run ./script/type-check

.github/workflows/publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Create Release & Publish to PYPI
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
run-checks:
10+
uses: ./.github/workflows/check.yml
11+
12+
publish:
13+
runs-on: ubuntu-latest
14+
needs:
15+
- run-checks
16+
steps:
17+
# Using v2 or later strips tag annotations https://github.com/actions/checkout/issues/290
18+
- uses: actions/checkout@v1
19+
20+
- name: Set up Poetry
21+
run: pipx install poetry==1.3.2
22+
23+
- name: Set up Python
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: '3.9'
27+
cache: poetry
28+
29+
- name: Build
30+
run: poetry build
31+
32+
- name: Publish to PyPI
33+
run: |
34+
poetry config pypi-token.pypi "${{ secrets.DLQ_PYPI_TOKEN }}"
35+
poetry publish
36+
37+
- name: Create GitHub Release
38+
uses: ncipollo/release-action@v1
39+
with:
40+
body: ${{ steps.tag_data.outputs.git-tag-annotation }}

DEVELOPMENT.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,14 @@ Tests are run with `./runtests`
77
## Releasing
88

99
CI handles releasing to PyPI.
10-
Releases on GitHub are created manually.
10+
Releases on GitHub are created automatically, using the message from the annotated tag.
1111

1212
Here's how to do a release:
1313

1414
- Get all the desired changes into `master`
1515
- Wait for CI to pass that
1616
- Add a bump commit (see previous "Declare vX.Y.Z" commits; `poetry version` may be useful here)
1717
- Push that commit on master
18-
- Create a tag of that version number (`git tag v$(poetry version --short)`)
18+
- Create a tag of that version number, with a description of the changes in the annotation (`git tag v$(poetry version --short) --annotate`)
1919
- Push the tag (`git push --tags`)
20-
- CI will build & deploy that release
21-
- Create a Release on GitHub, ideally with a summary of changes
20+
- CI will build & deploy that release as a GitHub Release and to PyPI

0 commit comments

Comments
 (0)