Skip to content

Commit

Permalink
Improve git actions and readme (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
pfouque authored Mar 26, 2024
1 parent 5d79981 commit 0b9425b
Show file tree
Hide file tree
Showing 11 changed files with 518 additions and 492 deletions.
7 changes: 7 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: 2

updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
36 changes: 36 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Coverage

on:
pull_request:
push:
branches:
- master

jobs:
coverage:
name: Check coverage
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4

- uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry

- name: Install requirements
run: poetry install

- name: Run tests
run: poetry run coverage run -m pytest --cov=django_fsm --cov-report=xml

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
7 changes: 4 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ name: django-fsm linting
on:
pull_request:
push:
branches: [main]
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- uses: pre-commit/[email protected]
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Release

on:
push:
tags:
- '*.*.*'

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- uses: snok/install-poetry@v1
with:
version: 1.3.2
virtualenvs-create: true
virtualenvs-in-project: true

- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: poetry

- name: Build project
run: poetry build

- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "dist/*"
token: ${{ secrets.GITHUB_TOKEN }}
draft: false

- name: Publish to PyPI
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
run: poetry publish
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml → .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

django-fsm unreleased
django-fsm 3.0.0 2024-03-25
~~~~~~~~~~~~~~~~~~~~~~~~~~~

- Drop support for Python < 3.8.
Expand Down
Loading

0 comments on commit 0b9425b

Please sign in to comment.