This repository has been archived by the owner on Aug 10, 2024. It is now read-only.
Use random SECRET_KEY #13
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: Deployment | |
on: | |
- push | |
- workflow_dispatch | |
permissions: | |
contents: read | |
jobs: | |
commit: | |
runs-on: ubuntu-latest | |
env: | |
ADMIN: NAME,[email protected] | |
ALLOWED_HOSTS: localhost,0.0.0.0,127.0.0.1 | |
CELERY_RESULT_BACKEND: "rpc://" | |
CLOUDAMQP_APIKEY: "" | |
CLOUDAMQP_URL: "" | |
CSRF_TRUSTED_ORIGINS: "" | |
DATABASE_URL: "" | |
DB_NAME: reboot | |
DB_USER: root | |
DB_PASSWORD: ${{ github.run_id }}-${{ github.run_attempt }} | |
DEBUG: True | |
DJANGO_DATABASE: local | |
EMAIL_HOST: smtp.gmail.com | |
EMAIL_HOST_DISPLAY_NAME: "" | |
EMAIL_HOST_USER: "" | |
EMAIL_HOST_PASSWORD: "" | |
SECRET_KEY: ${{ github.run_id }}-${{ github.run_attempt }} | |
SECURE_SSL_REDIRECT: False | |
DATA_UPLOAD_MAX_NUMBER_FIELDS: 1000 | |
services: | |
postgres: | |
image: postgres:13 | |
env: | |
POSTGRES_USER: root | |
POSTGRES_PASSWORD: ${{ env.DB_PASSWORD }} | |
POSTGRES_DB: reboot | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
rabbitmq: | |
image: rabbitmq:3 | |
ports: | |
- 5672:5672 | |
volumes: | |
- ${{ github.workspace }}/../rabbitmq/etc/rabbitmq:/etc/rabbitmq | |
- ${{ github.workspace }}/../rabbitmq/dev/ssl/cert:/dev/ssl/cert | |
options: --name rabbitmq --health-cmd "rabbitmqctl node_health_check" --health-interval 30s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout the Git repository | |
uses: actions/checkout@v3 | |
- name: Install RabbitMQ certificates | |
run: | | |
sudo cp ./rabbitmq.conf ../rabbitmq/etc/rabbitmq/rabbitmq.conf | |
sudo cp ./dev/ssl/cert/* ../rabbitmq/dev/ssl/cert | |
docker restart rabbitmq | |
- name: Set up Python 3.9 | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.9" | |
- name: Install dependencies | |
run: | | |
make post-install | |
- name: Lint with autopep8 | |
run: | | |
make lint-check | |
- name: Test with unittest | |
run: | | |
make celery & | |
make test | |
make coverage |