Skip to content

Commit

Permalink
Update docker compose syntax to keep GitHub Actions happy (#569)
Browse files Browse the repository at this point in the history
  • Loading branch information
amacneil authored Aug 19, 2024
1 parent 8db7622 commit 8079766
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,29 +113,29 @@ jobs:
set -x
docker version
docker buildx version
docker-compose version
docker compose version
- name: Build Docker image
run: |
set -x
docker-compose build
docker-compose run --rm --no-deps dbmate --version
docker compose build
docker compose run --rm --no-deps dbmate --version
- name: Run make build
run: docker-compose run --rm --no-deps dev make build ls
run: docker compose run --rm --no-deps dev make build ls

- name: Run make lint
run: docker-compose run --rm --no-deps dev make lint
run: docker compose run --rm --no-deps dev make lint

- name: Start test dependencies
run: |
set -x
docker-compose pull --ignore-buildable --quiet
docker-compose up --detach
docker-compose run --rm dev make wait
docker compose pull --ignore-buildable --quiet
docker compose up --detach
docker compose run --rm dev make wait
- name: Run make test
run: docker-compose run --rm dev make test
run: docker compose run --rm dev make test

- name: Login to Docker Hub
uses: docker/login-action@v3
Expand Down
8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ update-deps:

.PHONY: docker-build
docker-build:
docker-compose pull --ignore-buildable
docker-compose build
docker compose pull --ignore-buildable
docker compose build

.PHONY: docker-all
docker-all: docker-build
docker-compose run --rm dev make all
docker compose run --rm dev make all

.PHONY: docker-dev
docker-dev:
-docker-compose run --rm dev
-docker compose run --rm dev
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ _If you notice any inaccuracies in this table, please [propose a change](https:/

Dbmate is written in Go, pull requests are welcome.

Tests are run against a real database using docker-compose. To build a docker image and run the tests:
Tests are run against a real database using docker compose. To build a docker image and run the tests:

```sh
$ make docker-all
Expand Down
1 change: 0 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
version: "2.3"
services:
dev:
build:
Expand Down

0 comments on commit 8079766

Please sign in to comment.