Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:

steps:
- name: Approve
if: ${{ needs.build.result == 'success' && needs.integration-tests.result == 'success' }}
if: ${{ (needs.build.result == 'success' || needs.build.result == 'skipped') && (needs.integration-tests.result == 'success' || needs.integration-tests.result == 'skipped') }}
uses: actions/github-script@v7
with:
script: |
Expand All @@ -137,7 +137,7 @@ jobs:
process.exit(0)

- name: Reject
if: ${{ needs.build.result != 'success' || needs.integration-tests.result != 'success' }}
if: ${{ needs.build.result == 'failure' || needs.integration-tests.result == 'failure' }}
uses: actions/github-script@v7
with:
script: |
Expand Down
66 changes: 52 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,19 +1,57 @@
.PHONY: help
help:
@echo "Available make targets:"
@grep '^\.PHONY:' Makefile | sed 's/\.PHONY: //g' | tr ' ' '\n' | sort | uniq | \
while read target; do \
echo " make $$target"; \
done

.PHONY: reader
reader:
# Colors for pretty output
YELLOW = \033[1;33m
GREEN = \033[1;32m
RED = \033[1;31m
BLUE = \033[1;34m
NC = \033[0m

.PHONY: dev-reader
dev-reader: ## Run the flight-reader locally with .env variables.
@export $$(grep -v '^#' .env | xargs) && go run cmd/reader/main.go

.PHONY: dev-processor
dev-processor: ## Run the flight-processor locally with .env variables.
@export $$(grep -v '^#' .env | xargs) && go run cmd/processor/main.go

.PHONY: dev-poster
dev-poster: ## Run the flight-poster locally with .env variables.
@export $$(grep -v '^#' .env | xargs) && go run cmd/poster/main.go

.PHONY: docker-reader
docker-reader: ## Build the flight-reader Docker image.
docker build -t flight-reader -f docker/reader.Dockerfile .

.PHONY: processor
processor:
.PHONY: docker-processor
docker-processor: ## Build the flight-processor Docker image.
docker build -t flight-processor -f docker/processor.Dockerfile .

.PHONY: poster
poster:
.PHONY: docker-poster
docker-poster: ## Build the flight-poster Docker image.
docker build -t flight-poster -f docker/poster.Dockerfile .

.PHONY: compose-up
compose-up: ## Start all services with build in foreground.
docker compose up --build -d

.PHONY: compose-down
compose-down: ## Stop all services, remove volumes and orphans.
docker compose down --volumes --remove-orphans

.PHONY: compose-logs
compose-logs: ## Show logs from all services.
docker compose logs -f

.PHONY: lint
lint: ## Run linter.
@echo "$(YELLOW)Running linter...$(NC)"
@which golangci-lint > /dev/null || (echo "$(RED)golangci-lint not installed$(NC)" && exit 1)
golangci-lint run -c .golangci.yml
@echo "$(GREEN)Linting completed!$(NC)"

.PHONY: help
help: ## Display this help screen.
@echo "$(BLUE)Available targets:$(NC)"
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf " $(YELLOW)%-20s$(NC) %s\n", $$1, $$2}'

# Default target
.DEFAULT_GOAL := help
6 changes: 3 additions & 3 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ services:
- .env
build:
context: .
dockerfile: ./docker/reader.Dockerfile
dockerfile: ./deployments/docker/reader.Dockerfile
ports:
- 8080:8080
restart: on-failure:5
Expand All @@ -55,13 +55,13 @@ services:
- .env
build:
context: .
dockerfile: ./docker/processor.Dockerfile
dockerfile: ./deployments/docker/processor.Dockerfile
restart: on-failure:5

poster:
env_file:
- .env
build:
context: .
dockerfile: ./docker/poster.Dockerfile
dockerfile: ./deployments/docker/poster.Dockerfile
restart: on-failure:5
File renamed without changes.
File renamed without changes.
File renamed without changes.