Skip to content

Commit

Permalink
Don't use custom docker compose services for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
relud committed Jul 25, 2024
1 parent 659a9ed commit 4b085b4
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 35 deletions.
14 changes: 8 additions & 6 deletions .github/workflows/build-and-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
deployments: write
id-token: write
runs-on: ubuntu-latest
env:
COMPOSE_FILE: docker-compose.yml
steps:
- uses: actions/checkout@v4
- name: Get info
Expand All @@ -39,20 +41,20 @@ jobs:
run: make build
- name: Verify requirements.txt contains correct dependencies
run: |
docker compose run --rm --no-deps ci shell ./bin/run_verify_reqs.sh
docker compose run --rm --no-deps test shell ./bin/run_verify_reqs.sh
- name: Run lint check
run: |
make my.env
docker compose run --rm --no-deps ci shell ./bin/run_lint.sh
docker compose run --rm --no-deps test shell ./bin/run_lint.sh
- name: Run tests
run: |
make my.env
docker compose run --rm ci shell ./bin/run_tests.sh
docker compose run --rm test shell ./bin/run_tests.sh
- name: Run systemtest
run: |
docker compose run --rm ci-web shell ./bin/run_setup.sh
docker compose up --detach --wait --wait-timeout=10 ci-web
docker compose run --rm ci-web shell bash -c 'cd systemtest && NGINX_TESTS=0 POST_CHECK=1 HOST=http://ci-web:8000 pytest -vv'
make setup
docker compose up --detach --wait --wait-timeout=10 web
docker compose run --rm web shell systemtest/test_env.sh local
- name: Set Docker image tag to "latest" for updates of the main branch
if: github.ref == 'refs/heads/main'
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ target/
# Docker things
/.docker-build
/fakes3_root/
docker-compose.override.yml
my.env
.env
9 changes: 9 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
services:
base:
# define volumes in docker-compose.override.yml so that can be ignored in CI
volumes:
- .:/app
test:
volumes:
- .:/app
28 changes: 0 additions & 28 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,34 +53,6 @@ services:
volumes:
- .:/app

# Container that we use in CI--it can't volume mount things
ci:
image: local/antenna_deploy_base
env_file:
- docker/config/local_dev.env
- docker/config/test.env
- my.env
links:
- fakesentry
- gcs-emulator
- pubsub
- statsd

# like web but CI can't volume mount things
ci-web:
image: local/antenna_deploy_base
env_file:
# exclude docker/config/test.env because this will be used for systemtest
# which requires store and publish to actually happen
- docker/config/local_dev.env
- my.env
command: web
links:
- fakesentry
- gcs-emulator
- pubsub
- statsd

# Web container is a prod-like fully-functioning Antenna container
web:
extends:
Expand Down

0 comments on commit 4b085b4

Please sign in to comment.