-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add dependabot config, ci workflow, and makefile (#9)
### Summary This PR introduces the following updates: - **Minimal CI Workflow**: Adds a basic continuous integration setup to ensure maintainability. - **Dependabot Configuration**: Introduces a dependabot config to automatically check and update package versions. - **Makefile**: Includes a Makefile with common cargo commands for convenience (because I'm lazy LOL). ![image](https://github.com/user-attachments/assets/c94132d0-1645-49d3-93a4-d442199aff01) --------- Co-authored-by: Daniel Boll <[email protected]>
- Loading branch information
1 parent
e1df297
commit a878681
Showing
6 changed files
with
190 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: 2 | ||
|
||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
setup: | ||
name: Setup rust | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup rust | ||
uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0 | ||
with: | ||
toolchain: stable | ||
target: x86_64-unknown-linux-gnu | ||
components: clippy, rustfmt | ||
- name: Build project | ||
run: make build | ||
lint: | ||
name: Run lint and format | ||
needs: [setup] | ||
runs-on: ubuntu-24.04 | ||
env: | ||
RUSTFLAGS: "-Dwarnings" | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Setup rust | ||
uses: actions-rust-lang/setup-rust-toolchain@1fbea72663f6d4c03efaab13560c8a24cfd2a7cc # v1.9.0 | ||
with: | ||
toolchain: stable | ||
target: x86_64-unknown-linux-gnu | ||
components: clippy, rustfmt | ||
- name: Run Rustfmt | ||
uses: actions-rust-lang/rustfmt@2d1d4e9f72379428552fa1def0b898733fb8472d # v1.1.0 | ||
- name: Run Clippy | ||
uses: clechasseur/rs-clippy-check@a2a93bdcf05de7909aabd62eca762179ad3dbe50 # v3.0.5 | ||
with: | ||
args: --all-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
CARGO := $(shell command -v cargo 2> /dev/null) | ||
|
||
ifndef CARGO | ||
$(error "Cannot find cargo. Please install and try again!") | ||
endif | ||
|
||
all: help | ||
|
||
.PHONY: clean | ||
clean: ## Cleans up the project by removing the target directory. | ||
@$(CARGO) clean | ||
|
||
.PHONY: lint | ||
lint: ## Runs Clippy to lint the codebase. | ||
@$(CARGO) clippy --no-deps | ||
|
||
.PHONY: format | ||
format: ## Formats the codebase using rustfmt. | ||
@$(CARGO) fmt | ||
|
||
.PHONY: check | ||
check: format lint ## Formats the codebase and then lints it. | ||
|
||
.PHONY: build | ||
build: ## Compiles the project. | ||
@$(CARGO) build | ||
|
||
.PHONY: debug | ||
debug: ## Compiles and runs the project. | ||
@$(CARGO) run | ||
|
||
.PHONY: run | ||
run: ## Compiles and runs the project. | ||
@$(CARGO) run --release | ||
|
||
.PHONY: test | ||
test: ## Runs the test suite. | ||
@$(CARGO) test | ||
|
||
.PHONY: release | ||
release: clean ## Cleans up the project and compiles it for release profile. | ||
@$(CARGO) build --release --locked | ||
|
||
.PHONY: help | ||
help: ## Shows the help message with available commands. | ||
@echo "Available commands:" | ||
@grep -E '^[^[:space:]]+:[^:]*?## .*$$' $(MAKEFILE_LIST) | \ | ||
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-30s\033[0m %s\n", $$1, $$2}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pub mod app; | ||
pub mod tui; | ||
pub mod args; | ||
pub mod tui; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters