Skip to content

Switch to ruff, Django 5.2 #14

Switch to ruff, Django 5.2

Switch to ruff, Django 5.2 #14

Workflow file for this run

name: Test & Deploy
# This action will be run on the `main` branch
# or on any pull requests going into the `main` branch.
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
quality-control:
name: Quality Control
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.13"
- run: pip install -r requirements-dev.txt
- run: ruff check .
- run: ruff format --check .
- run: python manage.py check
- run: python manage.py makemigrations --check
deploy:
name: Deploy to CodeRed Cloud
# Only run the deployment if the previous checks succeeded.
needs: quality-control
# Only run in the main branch (i.e. not pull requests).
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# CodeRed Cloud command line tool.
# See: https://www.codered.cloud/docs/cli/
- name: Install cr tool
run: |
wget -nv -O /usr/local/bin/cr "https://www.codered.cloud/cli/cr-linux"
chmod +x /usr/local/bin/cr
# Run the deployment.
- name: Deploy
run: cr deploy demo-django
env:
CR_TOKEN: ${{ secrets.cr_token }}