summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorPaolo Melchiorre <paolo@melchiorre.org>2023-01-02 14:45:59 +0100
committerGitHub <noreply@github.com>2023-01-02 07:45:59 -0600
commitb59eb0687a374beec5bea73d88e09720d48d5af3 (patch)
tree6f8cbbdb0badb5e123b267ef1ecf02967bda873d /.github
parentbbf3610b5b92ebad3ceaba4e44241918fd65a8a8 (diff)
Improve code format with pre-commit (#1297)
Diffstat (limited to '.github')
-rw-r--r--.github/issue_template.md1
-rw-r--r--.github/stale.yml6
-rw-r--r--.github/workflows/tests.yml112
3 files changed, 59 insertions, 60 deletions
diff --git a/.github/issue_template.md b/.github/issue_template.md
index ac369c7b..3091f284 100644
--- a/.github/issue_template.md
+++ b/.github/issue_template.md
@@ -1,7 +1,6 @@
---
name: Issue
about: Submit a bug report or feature request for the website djangoproject.com
-
---
### Please read this first:
diff --git a/.github/stale.yml b/.github/stale.yml
index e3dd9e89..b6d6ccb5 100644
--- a/.github/stale.yml
+++ b/.github/stale.yml
@@ -8,9 +8,9 @@ daysUntilClose: 14
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
- This issue has been automatically marked as stale because it has not had
- recent activity. It will be closed if no further activity occurs. Thank you
- for your contributions.
+ This issue has been automatically marked as stale because it has not had
+ recent activity. It will be closed if no further activity occurs. Thank you
+ for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index ed0de5c4..cca9433a 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -2,63 +2,63 @@
name: Tests
on:
- push:
- branches:
- - main
- pull_request:
+ push:
+ branches:
+ - main
+ pull_request:
jobs:
- tests:
- runs-on: ubuntu-20.04
- strategy:
- fail-fast: false
+ tests:
+ runs-on: ubuntu-20.04
+ strategy:
+ fail-fast: false
- services:
- postgres:
- image: postgres:14-alpine
- env:
- POSTGRES_PASSWORD: postgres
- options: >-
- --health-cmd pg_isready
- --health-interval 10s
- --health-timeout 5s
- --health-retries 5
- ports:
- - 5432:5432
+ services:
+ postgres:
+ image: postgres:14-alpine
+ env:
+ POSTGRES_PASSWORD: postgres
+ options: >-
+ --health-cmd pg_isready
+ --health-interval 10s
+ --health-timeout 5s
+ --health-retries 5
+ ports:
+ - 5432:5432
- steps:
- - uses: actions/checkout@v2
- - name: Set up Python
- uses: actions/setup-python@v2
- with:
- python-version: 3.8
- - name: Install dependencies
- run: |
- python -m pip install --upgrade pip setuptools coveralls "tox<4"
- - name: Set up databases
- run: |
- PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost
- PGPASSWORD="postgres" createdb -U postgres -O djangoproject djangoproject -h localhost
- PGPASSWORD="postgres" createuser -U postgres -d code.djangoproject --superuser -h localhost
- PGPASSWORD="postgres" createdb -U postgres -O code.djangoproject code.djangoproject -h localhost
- PGPASSWORD="postgres" psql -U postgres -h localhost -c "ALTER USER djangoproject WITH PASSWORD 'secret';"
- PGPASSWORD="postgres" psql -U postgres -h localhost -c "ALTER USER \"code.djangoproject\" WITH PASSWORD 'secret';"
- - name: Load Trac data
- run: |
- PGPASSWORD="postgres" psql -U postgres -d code.djangoproject -h localhost < tracdb/trac.sql
- - name: Create secrets.json
- working-directory: ..
- run: |
- mkdir conf
- echo '{"db_host": "localhost", ' > conf/secrets.json
- echo '"db_password": "secret", ' >> conf/secrets.json
- echo '"trac_db_host": "localhost", ' >> conf/secrets.json
- echo '"trac_db_password": "secret", ' >> conf/secrets.json
- echo '"secret_key": "a"}' >> conf/secrets.json
- - name: Run tox
- run: |
- python -m tox -e py38-tests
- - name: Coveralls
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: coveralls --service=github
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.8
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools coveralls "tox<4"
+ - name: Set up databases
+ run: |
+ PGPASSWORD="postgres" createuser -U postgres -d djangoproject --superuser -h localhost
+ PGPASSWORD="postgres" createdb -U postgres -O djangoproject djangoproject -h localhost
+ PGPASSWORD="postgres" createuser -U postgres -d code.djangoproject --superuser -h localhost
+ PGPASSWORD="postgres" createdb -U postgres -O code.djangoproject code.djangoproject -h localhost
+ PGPASSWORD="postgres" psql -U postgres -h localhost -c "ALTER USER djangoproject WITH PASSWORD 'secret';"
+ PGPASSWORD="postgres" psql -U postgres -h localhost -c "ALTER USER \"code.djangoproject\" WITH PASSWORD 'secret';"
+ - name: Load Trac data
+ run: |
+ PGPASSWORD="postgres" psql -U postgres -d code.djangoproject -h localhost < tracdb/trac.sql
+ - name: Create secrets.json
+ working-directory: ..
+ run: |
+ mkdir conf
+ echo '{"db_host": "localhost", ' > conf/secrets.json
+ echo '"db_password": "secret", ' >> conf/secrets.json
+ echo '"trac_db_host": "localhost", ' >> conf/secrets.json
+ echo '"trac_db_password": "secret", ' >> conf/secrets.json
+ echo '"secret_key": "a"}' >> conf/secrets.json
+ - name: Run tox
+ run: |
+ python -m tox -e py38-tests
+ - name: Coveralls
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+ run: coveralls --service=github