Add abstract email user model and admin #1945
Workflow file for this run
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: Continuous Integration | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| pull_request_target: | |
| types: [opened, synchronize, reopened, labeled] | |
| jobs: | |
| code_tests: | |
| name: Code tests | |
| if: github.event_name != 'pull_request_target' | |
| runs-on: ubuntu-22.04 | |
| env: | |
| NIX_BUILD_SHELL: bash | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| - name: Run tests | |
| run: nix-shell --command "scripts/test.sh" | |
| integration_tests: | |
| name: Integration tests | |
| if: github.event_name != 'pull_request_target' | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [macos-14, macos-15, ubuntu-22.04] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - uses: ./.github/actions/setup | |
| - name: Setup git | |
| run: | | |
| git config --global user.email "example@example.com" | |
| git config --global user.name "Example" | |
| - name: Create test project | |
| run: | | |
| scripts/script-create-django-app.sh --name integration | |
| # - name: Setup tmate session | |
| # if: ${{ failure() }} | |
| # uses: mxschmitt/action-tmate@v3 | |
| - name: Run tests | |
| run: | | |
| cd integration | |
| nix-shell --command "python manage.py generate_client_assets" | |
| nix-shell --command "python manage.py build" | |
| nix-shell --command "scripts/test.sh --all" | |
| - name: Test server renders home page | |
| run: | | |
| cd integration | |
| nix-shell --command "python manage.py runserver 8000 &" | |
| sleep 20 | |
| curl -f http://localhost:8000/ | grep -q "The install worked successfully" | |
| kill %1 || true | |
| - name: Run tests after removing example | |
| run: | | |
| cd integration | |
| nix-shell --command "scripts/remove_example.sh" | |
| nix-shell --command "python manage.py generate_client_assets" | |
| nix-shell --command "python manage.py build" | |
| nix-shell --command "scripts/test.sh --all" | |
| website_tests: | |
| name: Website tests | |
| runs-on: ubuntu-22.04 | |
| if: | | |
| github.event_name == 'push' || | |
| (github.event_name == 'pull_request_target' && | |
| (github.event.action != 'labeled' && github.repository_owner == github.actor) || | |
| (github.event.action == 'labeled' && contains(github.event.pull_request.labels.*.name, 'website'))) | |
| steps: | |
| - name: Remove website label | |
| if: contains(github.event.pull_request.labels.*.name, 'website') | |
| run: | | |
| curl --silent --fail \ | |
| -X DELETE \ | |
| -H 'Accept: application/vnd.github.v3+json' \ | |
| -H 'Authorization: token ${{ github.token }}' \ | |
| 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.number }}/labels/website' | |
| - uses: actions/checkout@v3 | |
| if: github.event_name == 'push' | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/checkout@v3 | |
| if: github.event_name == 'pull_request_target' | |
| with: | |
| fetch-depth: 0 | |
| # See: https://github.com/actions/checkout/issues/518 | |
| ref: "refs/pull/${{ github.event.number }}/merge" | |
| - uses: ./.github/actions/setup | |
| - name: Run tests | |
| run: | | |
| cd website | |
| nix-shell --command "python manage.py generate_client_assets" | |
| nix-shell --command "scripts/test.sh --all" |