Skip to content

Commit

Permalink
ci(dagger): move the files (#251)
Browse files Browse the repository at this point in the history
Files are moved to avoid any confusion between the CI and potential dagger
module that could be used inside another CI for code generation.
  • Loading branch information
lerenn authored Jul 25, 2024
1 parent 7e5d760 commit beb5758
Show file tree
Hide file tree
Showing 23 changed files with 107 additions and 8,785 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: tests --src-dir .
args: -m build/ci tests --src-dir .
version: "0.11.0"

examples:
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: examples --src-dir .
args: -m build/ci examples --src-dir .
version: "0.11.0"

lint:
Expand All @@ -52,7 +52,7 @@ jobs:
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: lint --src-dir .
args: -m build/ci lint --src-dir .
version: "0.11.0"

check-generation:
Expand All @@ -68,7 +68,7 @@ jobs:
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: check-generation --src-dir .
args: -m build/ci check-generation --src-dir .
version: "0.11.0"

publish:
Expand All @@ -95,5 +95,5 @@ jobs:
- uses: dagger/dagger-for-github@v5
with:
verb: call
args: publish --src-dir .
args: -m build/ci publish --src-dir .
version: "0.11.0"
41 changes: 35 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
include tools/make/cmd.mk
include tools/make/dagger.mk
include tools/make/help.mk
include tools/make/local.mk

# For more information on how to execute this Makefile, please execute the following command:
#
# make help
.PHONY: all
all: check-generation lint test ## Run all the checks locally

.PHONY: check-generation
check-generation: ## Check files are generated locally
@sh ./scripts/check-generation.sh

.PHONY: clean
clean: down ## Clean the project locally
@rm -rf ./tmp/certs

.PHONY: down
down: ## Stop the local environment
@docker-compose down

.PHONY: generate
generate: ## Generate files locally
@go generate ./...

.PHONY: lint
lint: ## Lint the code locally
@go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.55 run ./...

.PHONY: publish
publish: dagger/publish ## Publish with tag on git, docker hub, etc. locally
@git tag ${TAG} && git push origin ${TAG}

.PHONY: test
test: up ## Perform tests locally
@go test ./...

.PHONY: up
up: ## Start the local environment
@go run ./tools/generate-certs
@docker-compose up -d
27 changes: 27 additions & 0 deletions build/ci/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
include ../../tools/make/help.mk

SRC_DIR := ../..

.PHONY: all
all: ## Run all the checks before commit on Dagger
@dagger call check --src-dir $(SRC_DIR)

.PHONY: examples
examples: ## Run all the examples on Dagger
@dagger call examples --src-dir $(SRC_DIR)

.PHONY: check-generation
check-generation: ## Check files are generated on Dagger
@dagger call check-generation --src-dir $(SRC_DIR)

.PHONY: lint
lint: ## Lint the code on Dagger
@dagger call lint --src-dir $(SRC_DIR)

.PHONY: publish
publish: ## Publish with tag on git, docker hub, etc. on Dagger
@dagger call publish --src-dir $(SRC_DIR) --ssh-dir=~/.ssh

.PHONY: test
test: ## Perform tests on Dagger
@dagger call tests --src-dir $(SRC_DIR)
279 changes: 0 additions & 279 deletions build/ci/dagger.gen.go

This file was deleted.

Loading

0 comments on commit beb5758

Please sign in to comment.