Skip to content

Commit eaa9cfe

Browse files
committed
Apply prettier fixes
1 parent 4ae78d6 commit eaa9cfe

File tree

5 files changed

+156
-149
lines changed

5 files changed

+156
-149
lines changed

.github/workflows/docker-publish.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
name: Create and publish a Docker image
22

33
on:
4-
push:
5-
branches: ['main']
4+
push:
5+
branches: ["main"]
66

77
env:
8-
REGISTRY: ghcr.io
9-
IMAGE_NAME: ${{ github.repository }}
8+
REGISTRY: ghcr.io
9+
IMAGE_NAME: ${{ github.repository }}
1010

1111
jobs:
12-
build-and-push-image:
13-
runs-on: ubuntu-latest
14-
permissions:
15-
contents: read
16-
packages: write
12+
build-and-push-image:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: read
16+
packages: write
1717

18-
steps:
19-
- name: Checkout repository
20-
uses: actions/checkout@v2
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v2
2121

22-
- name: Log in to the Container registry
23-
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
24-
with:
25-
registry: ${{ env.REGISTRY }}
26-
username: ${{ github.actor }}
27-
password: ${{ secrets.GITHUB_TOKEN }}
22+
- name: Log in to the Container registry
23+
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
24+
with:
25+
registry: ${{ env.REGISTRY }}
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
2828

29-
- name: Extract metadata (tags, labels) for Docker
30-
id: meta
31-
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
32-
with:
33-
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34-
flavor: |
35-
latest=true
36-
tags: |
37-
type=ref,event=branch
38-
type=sha
29+
- name: Extract metadata (tags, labels) for Docker
30+
id: meta
31+
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
32+
with:
33+
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
34+
flavor: |
35+
latest=true
36+
tags: |
37+
type=ref,event=branch
38+
type=sha
3939
40-
- name: Build and push Docker image
41-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42-
with:
43-
context: .
44-
push: true
45-
tags: ${{ steps.meta.outputs.tags }}
46-
labels: ${{ steps.meta.outputs.labels }}
40+
- name: Build and push Docker image
41+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
42+
with:
43+
context: .
44+
push: true
45+
tags: ${{ steps.meta.outputs.tags }}
46+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
name: Docker test build
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
4+
pull_request:
5+
push:
6+
branches:
7+
- main
88

99
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
permissions:
14-
contents: read
14+
contents: read
1515

1616
jobs:
17-
build-image:
18-
runs-on: ubuntu-latest
17+
build-image:
18+
runs-on: ubuntu-latest
1919

20-
# steps taken (and trimmed) from docker-publish.yml
21-
steps:
22-
- name: Checkout repository
23-
uses: actions/checkout@v2
20+
# steps taken (and trimmed) from docker-publish.yml
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@v2
2424

25-
- name: Build and push Docker image
26-
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
27-
with:
28-
context: .
29-
push: false
25+
- name: Build and push Docker image
26+
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
27+
with:
28+
context: .
29+
push: false

.github/workflows/linters.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
name: Linters
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
4+
pull_request:
5+
push:
6+
branches:
7+
- main
88

99
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
permissions:
14-
contents: read
14+
contents: read
1515

1616
jobs:
17-
black:
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout
21-
uses: actions/checkout@v4
22-
- name: black
23-
uses: psf/black@stable
17+
black:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
- name: black
23+
uses: psf/black@stable

.github/workflows/tests.yml

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
11
name: Tests
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
4+
pull_request:
5+
push:
6+
branches:
7+
- main
88

99
concurrency:
10-
group: ${{ github.workflow }}-${{ github.ref }}
11-
cancel-in-progress: true
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
1212

1313
permissions:
14-
contents: read
14+
contents: read
1515

1616
env:
17-
DJANGO_SETTINGS_MODULE: tracdjangoplugin.settings_tests
18-
# passlib has a conditional import for `crypt` which is going away in python 3.13
19-
# and therefore throwing warnings
20-
PYTHONWARNINGS: >
21-
error,
22-
default:::passlib.utils,
17+
DJANGO_SETTINGS_MODULE: tracdjangoplugin.settings_tests
18+
# passlib has a conditional import for `crypt` which is going away in python 3.13
19+
# and therefore throwing warnings
20+
PYTHONWARNINGS: >
21+
error,
22+
default:::passlib.utils,
2323
2424
jobs:
25-
noshadows:
26-
runs-on: ubuntu-24.04
27-
steps:
28-
- name: Checkout
29-
uses: actions/checkout@v4
30-
- uses: actions/setup-python@v5
31-
with:
32-
python-version: '3.11'
33-
- run: pip install "tinycss2>=1.2.0"
34-
- run: python noshadows.py --tests
25+
noshadows:
26+
runs-on: ubuntu-24.04
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
- uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.11"
33+
- run: pip install "tinycss2>=1.2.0"
34+
- run: python noshadows.py --tests
3535

36-
tracdjangoplugin:
37-
runs-on: ubuntu-24.04
38-
steps:
39-
- name: Checkout
40-
uses: actions/checkout@v4
41-
- uses: actions/setup-python@v5
42-
with:
43-
python-version: '3.11'
44-
- name: Install system package dependencies
45-
run: |
46-
sudo apt-get update
47-
sudo apt-get -y install subversion
48-
- name: Install requirements
49-
run: python -m pip install -r requirements.txt
50-
- name: Run tests
51-
run: python -m django test tracdjangoplugin.tests
36+
tracdjangoplugin:
37+
runs-on: ubuntu-24.04
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v4
41+
- uses: actions/setup-python@v5
42+
with:
43+
python-version: "3.11"
44+
- name: Install system package dependencies
45+
run: |
46+
sudo apt-get update
47+
sudo apt-get -y install subversion
48+
- name: Install requirements
49+
run: python -m pip install -r requirements.txt
50+
- name: Run tests
51+
run: python -m django test tracdjangoplugin.tests
5252

53-
traccheck:
54-
runs-on: ubuntu-24.04
55-
steps:
56-
- name: Checkout
57-
uses: actions/checkout@v4
58-
- uses: actions/setup-python@v5
59-
with:
60-
python-version: '3.11'
61-
- name: Install system package dependencies
62-
run: |
63-
sudo apt-get update
64-
sudo apt-get -y install subversion
65-
- name: Install requirements
66-
run: python -m pip install -r requirements.txt
67-
- name: Lint Trac configuration
68-
run: python traccheck.py lint trac-env/
69-
- name: Check frozen Trac components
70-
run: python traccheck.py components --check .TRACFREEZE.txt trac-env/
53+
traccheck:
54+
runs-on: ubuntu-24.04
55+
steps:
56+
- name: Checkout
57+
uses: actions/checkout@v4
58+
- uses: actions/setup-python@v5
59+
with:
60+
python-version: "3.11"
61+
- name: Install system package dependencies
62+
run: |
63+
sudo apt-get update
64+
sudo apt-get -y install subversion
65+
- name: Install requirements
66+
run: python -m pip install -r requirements.txt
67+
- name: Lint Trac configuration
68+
run: python traccheck.py lint trac-env/
69+
- name: Check frozen Trac components
70+
run: python traccheck.py components --check .TRACFREEZE.txt trac-env/

docker-compose.yml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
11
services:
2-
trac:
3-
image: ghcr.io/django/code.djangoproject.com:latest
4-
# Comment out to use the ghcr.io image:
5-
build:
6-
context: ./
7-
dockerfile: Dockerfile
8-
command: ["gunicorn", "--bind", "0:9000", "--reload", "tracdjangoplugin.wsgi"]
9-
environment:
10-
- TRAC_INI_database=postgres://code.djangoproject:secret@db/code.djangoproject
11-
- SECRETS_FILE=/code/secrets.json
12-
volumes:
13-
- ./:/code/
14-
ports:
15-
- 9000:9000
16-
depends_on:
17-
- db
18-
db:
19-
image: postgres:14-alpine
20-
ports:
21-
# Port 5435 might be handy for loading trac.sql from the djangoproject.com repo
22-
- 5435:5432
23-
environment:
24-
- POSTGRES_USER=code.djangoproject
25-
- POSTGRES_PASSWORD=secret
26-
- POSTGRES_DB=code.djangoproject
2+
trac:
3+
image: ghcr.io/django/code.djangoproject.com:latest
4+
# Comment out to use the ghcr.io image:
5+
build:
6+
context: ./
7+
dockerfile: Dockerfile
8+
command:
9+
[
10+
"gunicorn",
11+
"--bind",
12+
"0:9000",
13+
"--reload",
14+
"tracdjangoplugin.wsgi",
15+
]
16+
environment:
17+
- TRAC_INI_database=postgres://code.djangoproject:secret@db/code.djangoproject
18+
- SECRETS_FILE=/code/secrets.json
19+
volumes:
20+
- ./:/code/
21+
ports:
22+
- 9000:9000
23+
depends_on:
24+
- db
25+
db:
26+
image: postgres:14-alpine
27+
ports:
28+
# Port 5435 might be handy for loading trac.sql from the djangoproject.com repo
29+
- 5435:5432
30+
environment:
31+
- POSTGRES_USER=code.djangoproject
32+
- POSTGRES_PASSWORD=secret
33+
- POSTGRES_DB=code.djangoproject

0 commit comments

Comments
 (0)