Skip to content

Commit 1607b81

Browse files
billgloverlpatmo
andauthored
Avoid starting mailhog and adminer during testing. Fixes #68
- Starting unnecessary services takes time and consumes resources - Remove the need to start optional services - Users may need to add the `--remove-orphans` flag the first time they run `docker-compose down` after this change. Docker will alert users if this is the case. Co-authored-by: Linda <[email protected]>
1 parent bb78dd1 commit 1607b81

File tree

2 files changed

+16
-17
lines changed

2 files changed

+16
-17
lines changed

.github/workflows/test.yml

+14-14
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ on:
88

99
jobs:
1010
test:
11-
1211
name: test
1312
runs-on: ubuntu-latest
14-
13+
1514
steps:
16-
- uses: actions/checkout@v2
15+
- uses: actions/checkout@v2
16+
17+
- name: Run application
18+
run: docker-compose up -d web
1719

18-
- name: Run application
19-
run: docker-compose up -d
20-
21-
- name: Test Resources
22-
run: docker-compose run --rm manage test resources
20+
- name: Test Resources
21+
run: docker-compose run --rm manage test resources
22+
if: always()
2323

24-
- name: Test Users
25-
run: docker-compose run --rm manage test users
26-
if: always()
24+
- name: Test Users
25+
run: docker-compose run --rm manage test users
26+
if: always()
2727

28-
- name: Test UserAuth
29-
run: docker-compose run --rm manage test userauth
30-
if: always()
28+
- name: Test UserAuth
29+
run: docker-compose run --rm manage test userauth
30+
if: always()

docker-compose.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ services:
4343
# The nginx front-end is configured to proxy all traffic to the Django application.
4444
# We may want to use this to host static content. It is configured to reload
4545
# configuration every 6 hours.
46-
nginx:
46+
web:
4747
image: nginx:1.17-alpine
48-
container_name: nginx
48+
container_name: web
4949
restart: on-failure
5050
ports:
5151
- "8000:80"
@@ -89,4 +89,3 @@ services:
8989
- EMAIL_HOST=mailhog
9090
depends_on:
9191
- db
92-

0 commit comments

Comments
 (0)