tests #472
This file contains hidden or 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: deploy-check | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| permissions: | |
| actions: read | |
| contents: read | |
| jobs: | |
| classhub-deploy-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: | | |
| services/common/pyproject.toml | |
| services/classhub/requirements.txt | |
| .github/workflows/deploy-check.yml | |
| - name: Install classhub deps | |
| run: | | |
| pip install -r services/classhub/requirements.txt | |
| pip install -e services/common | |
| - name: Django deploy checks (classhub) | |
| env: | |
| DJANGO_DEBUG: "0" | |
| DJANGO_ALLOWED_HOSTS: localhost,127.0.0.1 | |
| DJANGO_SECRET_KEY: ci-only-strong-secret-key-1234567890-abcdefghijklmnopqrstuvwxyz | |
| DEVICE_HINT_SIGNING_KEY: ci-only-device-hint-key-0987654321-zyxwvutsrqponmlkjihgfedcba | |
| DJANGO_SECURE_SSL_REDIRECT: "1" | |
| DJANGO_SECURE_HSTS_SECONDS: "3600" | |
| DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS: "1" | |
| DJANGO_SECURE_HSTS_PRELOAD: "0" | |
| CLASSHUB_UPLOAD_ROOT: /tmp/classhub_uploads | |
| run: python services/classhub/manage.py check --deploy --fail-level WARNING | |
| helper-deploy-check: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| cache: pip | |
| cache-dependency-path: | | |
| services/common/pyproject.toml | |
| services/homework_helper/requirements.txt | |
| .github/workflows/deploy-check.yml | |
| - name: Install helper deps | |
| run: | | |
| pip install -r services/homework_helper/requirements.txt | |
| pip install -e services/common | |
| - name: Django deploy checks (helper) | |
| env: | |
| DJANGO_DEBUG: "0" | |
| DJANGO_ALLOWED_HOSTS: localhost,127.0.0.1 | |
| DJANGO_SECRET_KEY: ci-only-strong-secret-key-1234567890-abcdefghijklmnopqrstuvwxyz | |
| DJANGO_SECURE_SSL_REDIRECT: "1" | |
| DJANGO_SECURE_HSTS_SECONDS: "3600" | |
| DJANGO_SECURE_HSTS_INCLUDE_SUBDOMAINS: "1" | |
| DJANGO_SECURE_HSTS_PRELOAD: "0" | |
| run: python services/homework_helper/manage.py check --deploy --fail-level WARNING |