docs: add comprehensive README for require2fa app #33
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: Django Tests | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| workflow_call: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Build Docker image | |
| run: docker build -t dri-test . | |
| - name: Run Django tests | |
| run: | | |
| docker run --rm \ | |
| -e DATABASE_URL=sqlite:///test.db \ | |
| -e SECRET_KEY=test-secret-key-for-github-actions-only \ | |
| -e DEBUG=True \ | |
| -e BASE_URL=http://localhost:8000 \ | |
| -e AWS_ACCESS_KEY_ID=test-access-key \ | |
| -e AWS_SECRET_ACCESS_KEY=test-secret-key \ | |
| -e AWS_STORAGE_BUCKET_NAME=testbucket \ | |
| -e AWS_S3_REGION_NAME=us-east-1 \ | |
| -e AWS_S3_ENDPOINT_URL=http://localhost:9000 \ | |
| -e AWS_S3_USE_SSL=false \ | |
| -e EMAIL_URL=smtp://localhost:1025 \ | |
| -e DEFAULT_FROM_EMAIL=test@localhost \ | |
| --entrypoint "" \ | |
| dri-test \ | |
| uv run manage.py test |