From ca4bfe1959d1869094d080235c6935107cdc6408 Mon Sep 17 00:00:00 2001 From: Salvydas Lukosius Date: Mon, 18 May 2026 22:51:18 +0100 Subject: [PATCH] ci(trunk): add code quality checks --- .github/workflows/trunk-check.yml | 30 +++++++++++++++++++++++++ .prettierignore | 3 +++ .trunk/.gitignore | 9 ++++++++ .trunk/configs/.markdownlint.yaml | 8 +++++++ .trunk/configs/.yamllint.yaml | 11 +++++++++ .trunk/trunk.yaml | 37 +++++++++++++++++++++++++++++++ README.md | 15 ++++++------- 7 files changed, 105 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/trunk-check.yml create mode 100644 .prettierignore create mode 100644 .trunk/.gitignore create mode 100644 .trunk/configs/.markdownlint.yaml create mode 100644 .trunk/configs/.yamllint.yaml create mode 100644 .trunk/trunk.yaml diff --git a/.github/workflows/trunk-check.yml b/.github/workflows/trunk-check.yml new file mode 100644 index 0000000..3fbfa78 --- /dev/null +++ b/.github/workflows/trunk-check.yml @@ -0,0 +1,30 @@ +--- +name: Trunk Code Quality + +on: + push: + branches: [main] + tags: ["v*.*.*"] + pull_request: + types: [opened, synchronize, reopened] + schedule: + - cron: "0 05 * * 5" + workflow_dispatch: {} + +permissions: + contents: read + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + check: + name: Trunk Code Quality + permissions: + actions: read + checks: write + contents: read + uses: z-shell/.github/.github/workflows/trunk.yml@main + with: + arguments: --no-progress diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d8ea2a4 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,3 @@ +.travis.yml +code-of-conduct.md +contributing.md diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..598d7fc --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1,9 @@ +# Trunk local state +actions +logs +notifications +out +plugins +tmp +tools +user.yaml diff --git a/.trunk/configs/.markdownlint.yaml b/.trunk/configs/.markdownlint.yaml new file mode 100644 index 0000000..415a385 --- /dev/null +++ b/.trunk/configs/.markdownlint.yaml @@ -0,0 +1,8 @@ +--- +default: true +MD004: false +MD010: false +MD013: false +MD033: false +MD034: false +MD041: false diff --git a/.trunk/configs/.yamllint.yaml b/.trunk/configs/.yamllint.yaml new file mode 100644 index 0000000..a4b236e --- /dev/null +++ b/.trunk/configs/.yamllint.yaml @@ -0,0 +1,11 @@ +--- +extends: default + +ignore: | + .travis.yml + +rules: + document-start: disable + line-length: disable + truthy: + allowed-values: ["true", "false", "on", "off"] diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..a40377d --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,37 @@ +--- +version: 0.1 +cli: + version: 1.25.0 +repo: + repo: + host: github.com + owner: z-shell + name: zunit +plugins: + sources: + - id: trunk + ref: v1.10.0 + uri: https://github.com/trunk-io/plugins +lint: + disabled: + - checkov + - trivy + - trufflehog + enabled: + - actionlint@1.7.12 + - git-diff-check + - gitleaks@8.30.1 + - markdownlint@0.48.0 + - prettier@3.8.3 + - yamllint@1.38.0 +runtimes: + enabled: + - go@1.21.0 + - node@22.16.0 + - python@3.14.4 +actions: + enabled: + - trunk-announce + - trunk-check-pre-push + - trunk-fmt-pre-commit + - trunk-upgrade-available diff --git a/README.md b/README.md index 8d6ea87..6e20308 100644 --- a/README.md +++ b/README.md @@ -36,12 +36,12 @@ zulu install zunit > **NOTE:** In versions of Zulu prior to `1.2.0`, there is an additional step required after install: - ```sh - cd ~/.zulu/packages/zunit - ./build.zsh - zulu link zunit - ``` - +```sh +cd ~/.zulu/packages/zunit +./build.zsh +zulu link zunit +``` + ### [zplug](https://github.com/zplug/zplug) ZUnit and its dependencies can all be installed with zplug. @@ -56,7 +56,6 @@ zplug 'zdharma/zunit', \ hook-build:'./build.zsh' ``` - ### Homebrew ```sh @@ -113,4 +112,4 @@ ZUnit is licensed under The MIT License (MIT) ## Team -* [James Dinsdale](http://molovo.co) +- [James Dinsdale](http://molovo.co)