Skip to content

Commit 0b9425b

Browse files
authored
Improve git actions and readme (#16)
1 parent 5d79981 commit 0b9425b

File tree

11 files changed

+518
-492
lines changed

11 files changed

+518
-492
lines changed

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: monthly

.github/workflows/coverage.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Coverage
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- master
8+
9+
jobs:
10+
coverage:
11+
name: Check coverage
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out
15+
uses: actions/checkout@v4
16+
17+
- uses: snok/install-poetry@v1
18+
with:
19+
version: 1.3.2
20+
virtualenvs-create: true
21+
virtualenvs-in-project: true
22+
23+
- name: Set up Python 3.11
24+
uses: actions/setup-python@v4
25+
with:
26+
python-version: "3.11"
27+
cache: poetry
28+
29+
- name: Install requirements
30+
run: poetry install
31+
32+
- name: Run tests
33+
run: poetry run coverage run -m pytest --cov=django_fsm --cov-report=xml
34+
35+
- name: Upload coverage reports to Codecov
36+
uses: codecov/codecov-action@v3

.github/workflows/lint.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,16 @@ name: django-fsm linting
33
on:
44
pull_request:
55
push:
6-
branches: [main]
6+
branches:
7+
- main
78

89
jobs:
910
build:
1011
runs-on: ubuntu-latest
1112

1213
steps:
13-
- uses: actions/checkout@v1
14-
- uses: actions/setup-python@v2
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-python@v4
1516
with:
1617
python-version: '3.11'
1718
- uses: pre-commit/[email protected]

.github/workflows/release.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- uses: snok/install-poetry@v1
17+
with:
18+
version: 1.3.2
19+
virtualenvs-create: true
20+
virtualenvs-in-project: true
21+
22+
- name: Set up Python 3.11
23+
uses: actions/setup-python@v4
24+
with:
25+
python-version: "3.11"
26+
cache: poetry
27+
28+
- name: Build project
29+
run: poetry build
30+
31+
- name: Create Release
32+
uses: ncipollo/release-action@v1
33+
with:
34+
artifacts: "dist/*"
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
draft: false
37+
38+
- name: Publish to PyPI
39+
env:
40+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
41+
run: poetry publish

.github/workflows/tests.yml renamed to .github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ jobs:
1414
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
1515

1616
steps:
17-
- uses: actions/checkout@v1
17+
- uses: actions/checkout@v4
1818
- name: Set up Python ${{ matrix.python-version }}
19-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2020
with:
2121
python-version: ${{ matrix.python-version }}
2222
- name: Install dependencies

CHANGELOG.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Changelog
22
=========
33

4-
django-fsm unreleased
4+
django-fsm 3.0.0 2024-03-25
55
~~~~~~~~~~~~~~~~~~~~~~~~~~~
66

77
- Drop support for Python < 3.8.

0 commit comments

Comments
 (0)