Skip to content

Commit

Permalink
Upgrade to latest docker and actions
Browse files Browse the repository at this point in the history
- Update Makefile to invoke `docker compose` instead of `docker-compose` since the latter was deprecated in latest version of docker; see [article](https://docs.docker.com/compose/migrate/)
- Update docker-compose.yml to drop version field since it is deprecated in latest version of docker compose; see [forum](https://forums.docker.com/t/docker-compose-yml-version-is-obsolete/141313)
- Update README.md to document version and build steps required for local development
- Update release.yml to assert successful state since completed doesn't imply that, see [comment](https://github.com/orgs/community/discussions/26238#discussioncomment-3250901).
- Update test.yml to upgrade checkout action
  • Loading branch information
naushadh committed Aug 20, 2024
1 parent f64f365 commit c843fb3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
release:
name: Push to DockerHub
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Login to DockerHub
run: echo $DOCKER_PASS | docker login --username $DOCKER_USER --password-stdin
Expand All @@ -25,4 +25,4 @@ jobs:
run: make env-up

- name: Run tests
run: docker-compose run test
run: make test
15 changes: 11 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Available commands:

- env-up: Boot up development environment

- test: Run all tests

- env-down: Tear down development environment

- help: Display this help message
Expand All @@ -18,14 +20,19 @@ help:
.PHONY: help

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

env-up: build
docker-compose up --detach
while ! (docker-compose logs app | grep 'Starting Metastore'); do sleep 1 && printf .; done
docker compose up --detach
while ! (docker compose logs app | grep 'Starting Metastore'); do sleep 1 && printf .; done
.PHONY: env-up

test:
docker compose run --no-deps test
.PHONY: test

env-down:
docker-compose down
docker compose down
.PHONY: env-down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,14 @@ S3_PREFIX | Yes | S3 bucket prefix

This project has most of the batteries included to test and verify that the app works

1. Install docker and docker-compose
1. Install docker (27+) with compose

2. Launch dev environment
```bash
$ make env-up
$ make build env-up
```

3. Run test(s)
```bash
$ docker-compose run test
$ make test
```
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: '3.9'

services:
postgres:
image: postgres:14-alpine
Expand Down

0 comments on commit c843fb3

Please sign in to comment.