Skip to content

Commit ad08667

Browse files
chore(deps): update dependency https://github.com/developerc286/template to v1.6.3 (#428)
* chore(deps): update dependency https://github.com/developerc286/template to v1.6.3 * BUILD: WORKING COMMIT - DELETE --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: DeveloperC <[email protected]>
1 parent dee0f2d commit ad08667

File tree

8 files changed

+77
-32
lines changed

8 files changed

+77
-32
lines changed

.copier-answers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Changes here will be overwritten by Copier
2-
_commit: v1.6.1
2+
_commit: v1.6.3
33
_src_path: https://github.com/DeveloperC286/template
44
project_name: clean_git_history
55
uses_git: true

.github/workflows/continuous-integration.yml

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,19 @@ permissions:
66
contents: read
77

88
jobs:
9+
permissions:
10+
name: Permissions
11+
runs-on: ${{ matrix.architecture }}
12+
strategy:
13+
matrix:
14+
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
15+
language: [shell]
16+
steps:
17+
- name: Checkout code.
18+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
19+
- name: Check permissions.
20+
run: make check-${{ matrix.language }}-permissions
21+
922
formatting:
1023
name: Formatting
1124
runs-on: ${{ matrix.architecture }}
@@ -27,7 +40,7 @@ jobs:
2740
strategy:
2841
matrix:
2942
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
30-
language: [rust, shell]
43+
language: [rust, shell, python]
3144
steps:
3245
- name: Checkout code.
3346
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -36,17 +49,20 @@ jobs:
3649
- name: Check linting.
3750
run: nix develop -c make check-${{ matrix.language }}-linting
3851

39-
scripts-permissions:
40-
name: Scripts Permissions
52+
dependencies:
53+
name: Dependencies
4154
runs-on: ${{ matrix.architecture }}
4255
strategy:
4356
matrix:
4457
architecture: [ubuntu-24.04, ubuntu-24.04-arm]
58+
language: [rust]
4559
steps:
4660
- name: Checkout code.
4761
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
48-
- name: Check scripts permissions.
49-
run: make check-scripts-permissions
62+
- name: Setup Nix.
63+
uses: cachix/install-nix-action@4e002c8ec80594ecd40e759629461e26c8abed15 # v31.9.0
64+
- name: Check dependencies.
65+
run: nix develop -c make check-${{ matrix.language }}-dependencies
5066

5167
compile:
5268
name: Compile

.github/workflows/conventional-commits.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Linting
1111
runs-on: ubuntu-24.04
1212
container:
13-
image: ghcr.io/developerc286/conventional_commits_linter:0.17.0@sha256:d6fb0dfd79c2e06897692bc3f0dc62bcb7ce90a92030c81a3137935516d525d7
13+
image: ghcr.io/developerc286/conventional_commits_linter:0.17.1@sha256:f1b947937ee884ba7f886d04939cd4858f9aeafb50dcf94925a516c50e43021b
1414
steps:
1515
- name: Checkout code.
1616
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/git-history.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
name: Clean
1111
runs-on: ubuntu-24.04
1212
container:
13-
image: ghcr.io/developerc286/clean_git_history:1.1.5@sha256:b1374591d48393f6b5fcc888f6bc7da05f7d218961f7850112130b1cad78186a
13+
image: ghcr.io/developerc286/clean_git_history:1.1.6@sha256:93fd9c692f6e629956921b8d068ccad33760882b6e0c6d4d32cd963380aec25f
1414
steps:
1515
- name: Checkout code.
1616
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

Makefile

Lines changed: 33 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,49 @@
11
# Auto-detect musl target for static binaries (Linux only)
2+
# Only set MUSL_TARGET on supported architectures; targets that need it will check
23
MUSL_TARGET := $(shell uname -m | sed 's/^x86_64$$/x86_64-unknown-linux-musl/;s/^aarch64$$/aarch64-unknown-linux-musl/')
3-
ifeq ($(filter %unknown-linux-musl,$(MUSL_TARGET)),)
4-
$(error Unsupported architecture: $(shell uname -m). Static musl builds only supported on Linux x86_64 and aarch64)
5-
endif
4+
5+
define check-musl-target
6+
$(if $(filter %unknown-linux-musl,$(MUSL_TARGET)),,$(error Unsupported architecture: $(shell uname -m). Static musl builds only supported on Linux x86_64 and aarch64))
7+
endef
68

79
# Use --locked in CI to ensure reproducible builds
810
CARGO_LOCKED := $(if $(CI),--locked,)
911

1012
.PHONY: default
1113
default: compile
1214

15+
.PHONY: check-shell-permissions
16+
check-shell-permissions:
17+
./ci/check-scripts-permissions.sh
18+
1319
.PHONY: check-rust-formatting
1420
check-rust-formatting:
1521
cargo fmt --all -- --check --config=group_imports=StdExternalCrate
1622

17-
.PHONY: check-shell-formatting
18-
check-shell-formatting:
19-
shfmt --simplify --diff ci/*
20-
21-
.PHONY: check-python-formatting
22-
check-python-formatting:
23-
autopep8 --exit-code --diff --aggressive --aggressive --max-line-length 120 --recursive end-to-end-tests/
24-
25-
.PHONY: check-yaml-formatting
26-
check-yaml-formatting:
27-
yamlfmt -verbose -lint -dstar .github/workflows/*
28-
2923
.PHONY: fix-rust-formatting
3024
fix-rust-formatting:
3125
cargo fmt --all -- --config=group_imports=StdExternalCrate
3226

27+
.PHONY: check-shell-formatting
28+
check-shell-formatting:
29+
shfmt --simplify --diff ci/*
30+
3331
.PHONY: fix-shell-formatting
3432
fix-shell-formatting:
3533
shfmt --simplify --write ci/*
3634

35+
.PHONY: check-python-formatting
36+
check-python-formatting:
37+
autopep8 --exit-code --diff --aggressive --aggressive --max-line-length 120 --recursive end-to-end-tests/
38+
3739
.PHONY: fix-python-formatting
3840
fix-python-formatting:
3941
autopep8 --in-place --aggressive --aggressive --max-line-length 120 --recursive end-to-end-tests/
4042

43+
.PHONY: check-yaml-formatting
44+
check-yaml-formatting:
45+
yamlfmt -verbose -lint -dstar .github/workflows/*
46+
4147
.PHONY: fix-yaml-formatting
4248
fix-yaml-formatting:
4349
yamlfmt -verbose -dstar .github/workflows/*
@@ -50,13 +56,21 @@ check-rust-linting:
5056
check-shell-linting:
5157
shellcheck ci/*.sh
5258

59+
.PHONY: check-python-linting
60+
check-python-linting:
61+
ruff check --line-length 120 end-to-end-tests/
62+
63+
.PHONY: fix-python-linting
64+
fix-python-linting:
65+
ruff check --fix --line-length 120 end-to-end-tests/
66+
5367
.PHONY: check-github-actions-workflows-linting
5468
check-github-actions-workflows-linting:
5569
actionlint -verbose -color
5670

57-
.PHONY: check-scripts-permissions
58-
check-scripts-permissions:
59-
./ci/check-scripts-permissions.sh
71+
.PHONY: check-rust-dependencies
72+
check-rust-dependencies:
73+
cargo machete
6074

6175
.PHONY: compile
6276
compile:
@@ -72,6 +86,7 @@ end-to-end-test: compile
7286

7387
.PHONY: release
7488
release:
89+
$(call check-musl-target)
7590
cargo build --release --target=$(MUSL_TARGET) --locked --verbose
7691

7792
.PHONY: publish-binary

end-to-end-tests/features/steps/assertions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def assert_error_contains(result, error):
3131

3232

3333
def assert_error_matches_regex(result, regex):
34-
assert regex.match(result.stderr) is not None, f"Expected standard error to match the regex.\n" + \
34+
assert regex.match(result.stderr) is not None, "Expected standard error to match the regex.\n" + \
3535
f"Standard error = {result.stderr.encode()}.\n" + \
3636
f"Regex = {regex.pattern.encode()}.\n"
3737

end-to-end-tests/features/steps/then.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
from behave import then
33

44
from utilities import execute_clean_git_history
5-
from assertions import *
5+
from assertions import (
6+
assert_command_successful,
7+
assert_command_unsuccessful,
8+
assert_error_contains,
9+
assert_error_matches_regex,
10+
assert_no_errors,
11+
assert_no_output,
12+
)
613

714

815
@then('the Git history is clean.')

flake.nix

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,22 @@
4040
buildInputs = [
4141
# Rust with cross-compilation targets built-in.
4242
rustWithTargets
43-
# Shell scripts.
43+
# Shell formatting.
4444
pkgs.shfmt
45-
pkgs.shellcheck
46-
# GitHub Action Workflows.
45+
# Python formatting.
46+
pkgs.python313Packages.autopep8
47+
# YAML formatting.
4748
pkgs.yamlfmt
49+
# Shell linting.
50+
pkgs.shellcheck
51+
# Python linting.
52+
pkgs.ruff
53+
# GitHub Actions workflows linting.
4854
pkgs.actionlint
55+
# Rust dependencies check.
56+
pkgs.cargo-machete
4957
# End to end tests.
5058
pkgs.python313
51-
pkgs.python313Packages.autopep8
5259
pkgs.python313Packages.behave
5360
pkgs.git
5461
# Deploying.

0 commit comments

Comments
 (0)