Skip to content

Merge pull request #25 from baseplate-admin/remove #11

Merge pull request #25 from baseplate-admin/remove

Merge pull request #25 from baseplate-admin/remove #11

Workflow file for this run

name: CI
on:
push:
workflow_dispatch:
pull_request:
types: [assigned, opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
# django-version: ['<4.2', '<4.3', '<5.1']
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install python dependencies
run: |
poetry install --sync --no-interaction --no-root
- name: Test
run: poetry run pytest .
merge:
runs-on: ubuntu-latest
needs: [test]
if: github.actor == 'dependabot[bot]' # Detect that the PR author is dependabot
steps:
- uses: actions/checkout@v4
- name: Enable auto-merge for Dependabot PRs
run: gh pr merge --auto --merge "$PR_URL" # Use Github CLI to merge automatically the PR
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
release:
runs-on: ubuntu-latest
if: "startsWith(github.ref, 'refs/tags/')"
needs: [test]
steps:
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install python dependencies
run: |
poetry install --sync --no-interaction --no-root --with test
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
- name: Publish
run: |
poetry publish --build