[pre-commit.ci] pre-commit autoupdate #107
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: ["main"] | |
push: | |
branches: ["main"] | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
django-version: ["4.2", "5.0", "5.1"] | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- django-version: "5.0" | |
python-version: "3.8" | |
- django-version: "5.0" | |
python-version: "3.9" | |
- django-version: "5.1" | |
python-version: "3.8" | |
- django-version: "5.1" | |
python-version: "3.9" | |
services: | |
redis: | |
image: redis | |
ports: | |
- 6379:6379 | |
steps: | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip wheel | |
pip install -e . | |
python -m pip install -r requirements.txt | |
python -m pip install django~=${{ matrix.django-version }} | |
- name: Run tests | |
run: python -m coverage run runtests.py | |
- name: Generate coverage report | |
run: python -m coverage xml | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 | |
release: | |
if: ${{ github.event_name == 'release' }} | |
runs-on: ubuntu-latest | |
needs: [test] | |
environment: | |
name: pypi | |
url: https://pypi.org/p/django-rq-email-backend | |
permissions: | |
id-token: write | |
steps: | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.12" | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: python -m pip install -U pip wheel hatch | |
- name: Build package | |
run: hatch build | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 |