Update pytest requirement from ^7.2 to ^8.0 #113
Workflow file for this run
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: | |
push: | |
branches: | |
- master | |
tags: | |
- v** # Run on all version tags | |
pull_request: | |
jobs: | |
pytest: | |
name: pytest | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python: ["3.8", "3.9", "3.10", "3.11"] | |
django: ["3.2.16", "4.0.8", "4.1.4" ] | |
exclude: | |
# Excludes Python 3.11 for Django < 4.1 | |
- python: "3.11" | |
django: "3.2.16" | |
- python: "3.11" | |
django: "4.0.8" | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 5s | |
--health-timeout 1s | |
--health-retries 5 | |
ports: | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
architecture: x64 | |
- run: pip install --upgrade pip | |
- run: pip install poetry | |
- run: poetry config --local virtualenvs.in-project true | |
- run: poetry install | |
- run: pip install -U django==${{ matrix.django }} | |
- run: PGPASSWORD=postgres psql -c 'create database tests;' -U postgres -h localhost -p 5432 | |
- run: poetry run ./bin/test | |
pre-commit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- uses: pre-commit/[email protected] | |
publish: | |
if: startsWith(github.event.ref, 'refs/tags') | |
name: publish | |
needs: pytest | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
architecture: x64 | |
- run: pip install --upgrade pip | |
- run: pip install poetry | |
- run: poetry build | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password_test }} | |
repository_url: https://test.pypi.org/legacy/ | |
- uses: pypa/gh-action-pypi-publish@master | |
with: | |
password: ${{ secrets.pypi_password }} | |
- uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: ${{ github.ref }} | |
release_name: ${{ github.ref }} | |
body: | | |
Changes: | |
- ... | |
- ... | |
draft: true | |
prerelease: false |