Skip to content

Commit

Permalink
chore: Merge branch 'main' into feature/kube-proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Techassi committed Nov 20, 2024
2 parents 7565d91 + 0f62acd commit eac9b8f
Show file tree
Hide file tree
Showing 24 changed files with 2,579 additions and 142 deletions.
32 changes: 9 additions & 23 deletions .github/workflows/pr_pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,15 @@ jobs:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
fetch-depth: 0
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5.1.0
- uses: cachix/install-nix-action@08dcb3a5e62fa31e2da3d490afc4176ef55ecd72 #v30
with:
python-version: '3.12'
- uses: dtolnay/rust-toolchain@master
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
toolchain: ${{ env.RUST_TOOLCHAIN_VERSION }}
components: rustfmt,clippy
- name: Setup Hadolint
shell: bash
run: |
set -euo pipefail
LOCATION_DIR="$HOME/.local/bin"
LOCATION_BIN="$LOCATION_DIR/hadolint"
SYSTEM=$(uname -s)
ARCH=$(uname -m)
mkdir -p "$LOCATION_DIR"
curl -sL -o "${LOCATION_BIN}" "https://github.com/hadolint/hadolint/releases/download/${{ env.HADOLINT_VERSION }}/hadolint-$SYSTEM-$ARCH"
chmod 700 "${LOCATION_BIN}"
echo "$LOCATION_DIR" >> "$GITHUB_PATH"
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
node-version: 18
cache: yarn
- run: yarn install --frozen-lockfile
- uses: stackabletech/actions/run-pre-commit@9bd13255f286e4b7a654617268abe1b2f37c3e0a # v0.3.0
with:
extra_args: "--from-ref ${{ github.event.pull_request.base.sha }} --to-ref ${{ github.event.pull_request.head.sha }}"
rust: ${{ env.RUST_TOOLCHAIN_VERSION }}
hadolint: ${{ env.HADOLINT_VERSION }}
15 changes: 8 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- id: fmt
args: ["--all", "--", "--check"]
- id: clippy
args: ["--all-targets", "--", "-D", "warnings"]
args: ["--all-targets", "--all-features", "--", "-D", "warnings"]

- repo: https://github.com/adrienverge/yamllint
rev: 81e9f98ffd059efe8aa9c1b1a42e5cce61b640c6 # 1.35.1
Expand All @@ -40,6 +40,7 @@ repos:
hooks:
- id: shellcheck
args: ["--severity=info"]
exclude: '^extra/completions/'

- repo: https://github.com/rhysd/actionlint
rev: 62dc61a45fc95efe8c800af7a557ab0b9165d63b # 1.7.1
Expand All @@ -58,45 +59,45 @@ repos:
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-man
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: gen-comp
name: gen-comp
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-comp
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: gen-openapi
name: gen-openapi
files: ^web/
language: system
entry: cargo xtask gen-openapi
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: gen-ctl-readme
name: gen-ctl-readme
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-ctl-readme
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: gen-docs
name: gen-docs
files: ^rust/stackablectl/
language: system
entry: cargo xtask gen-docs
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false

- id: gen-cargo-nix
name: gen-cargo-nix
files: ^Cargo\.lock|go\.mod$
language: system
entry: make regenerate-nix
stages: [commit, merge-commit, manual]
stages: [pre-commit, pre-merge-commit, manual]
pass_filenames: false
14 changes: 13 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 74 additions & 47 deletions Cargo.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ bindgen = "0.70.1"
cc = "1.0.83"
clap = { version = "4.5", features = ["derive", "env"] }
clap_complete = "4.5"
clap_complete_nushell = "4.5"
comfy-table = { version = "7.1", features = ["custom_styling"] }
directories = "5.0"
dotenvy = "0.15"
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ hooks are:
- [`yamllint`](https://github.com/adrienverge/yamllint): Runs linting on all YAML files
- [`markdownlint`](https://github.com/igorshubovych/markdownlint-cli): Runs linting on all Markdown files
- [`prettier`](https://github.com/pre-commit/mirrors-prettier): Runs prettier on files located in `web`
- `cargo clippy -- -D warnings`: Runs Clippy on all files and errors on warnings
- `cargo clippy --all-targets --all-features -- -D warnings`: Runs Clippy on all files and errors on warnings
- `cargo fmt -- --check`: Checks if Rust code needs formatting
- `cargo xtask gen-comp`: Runs shell completions generation for `stackablectl`
- `cargo xtask gen-man`: Runs man page generation for `stackablectl`
Expand All @@ -77,4 +77,3 @@ hooks are:
[pre-commit]: https://pre-commit.com/
[web-readme]: ./web/README.md
[lib-readme]: ./rust/stackable-cockpit/README.md
[xtasks]: ./xtask/src/main.rs
2 changes: 1 addition & 1 deletion crate-hashes.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions docs/modules/stackablectl/partials/commands/completions.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ Generate shell completions for this tool
Usage: stackablectl completions [OPTIONS] <COMMAND>
Commands:
bash Generate shell completions for Bash
fish Generate shell completions for Fish
zsh Generate shell completions for ZSH
help Print this message or the help of the given subcommand(s)
bash Generate shell completions for Bash
elvish Generate shell completions for Elvish
fish Generate shell completions for Fish
nushell Generate shell completions for Nushell
zsh Generate shell completions for ZSH
help Print this message or the help of the given subcommand(s)
Options:
-l, --log-level <LOG_LEVEL>
Expand Down
Loading

0 comments on commit eac9b8f

Please sign in to comment.