From a5c3c8e4ad40603109fc69624e4bb3fe09728123 Mon Sep 17 00:00:00 2001 From: Salvydas Lukosius Date: Sun, 12 Jun 2022 22:41:55 +0100 Subject: [PATCH] workspace(update) modified: .editorconfig new file: .github/.markdownlint.yaml new file: .github/CODEOWNERS new file: .github/ISSUE_TEMPLATE/01_bug_report.yml new file: .github/ISSUE_TEMPLATE/config.yml new file: .github/workflows/sync-labels.yml new file: .github/workflows/trunk_check.yml new file: .trunk/.gitignore new file: .trunk/trunk.yaml modified: .vscode/settings.json modified: docs/README.md modified: "functions/\342\206\222za-test-handler" modified: "functions/\342\206\222za-test-make-targets" modified: z-a-test.plugin.zsh --- .editorconfig | 61 -------------- .github/.markdownlint.yaml | 10 +++ .github/CODEOWNERS | 1 + .github/ISSUE_TEMPLATE/01_bug_report.yml | 83 ++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 18 +++++ .github/workflows/sync-labels.yml | 12 +++ .github/workflows/trunk_check.yml | 18 +++++ .trunk/.gitignore | 1 + .trunk/trunk.yaml | 19 +++++ .vscode/settings.json | 33 +++++++- docs/README.md | 59 ++++---------- "functions/\342\206\222za-test-handler" | 0 "functions/\342\206\222za-test-make-targets" | 0 z-a-test.plugin.zsh | 0 14 files changed, 210 insertions(+), 105 deletions(-) create mode 100644 .github/.markdownlint.yaml create mode 100644 .github/CODEOWNERS create mode 100644 .github/ISSUE_TEMPLATE/01_bug_report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/workflows/sync-labels.yml create mode 100644 .github/workflows/trunk_check.yml create mode 100644 .trunk/.gitignore create mode 100644 .trunk/trunk.yaml mode change 100644 => 100755 "functions/\342\206\222za-test-handler" mode change 100644 => 100755 "functions/\342\206\222za-test-make-targets" mode change 100644 => 100755 z-a-test.plugin.zsh diff --git a/.editorconfig b/.editorconfig index 116720c..0f7fe88 100644 --- a/.editorconfig +++ b/.editorconfig @@ -56,68 +56,7 @@ indent_size = 4 charset = utf-8 indent_style = space indent_size = 2 -max_line_length = 120 [CHANGELOG.md] indent_style = tab indent_size = 4 - -[*.{c++,cc,cpp,cxx,h,h++,hh,hpp,hxx,inl,ipp,tlh,tli}] -cpp_indent_braces=false -cpp_indent_multi_line_relative_to=innermost_parenthesis -cpp_indent_within_parentheses=indent -cpp_indent_preserve_within_parentheses=false -cpp_indent_case_labels=false -cpp_indent_case_contents=true -cpp_indent_case_contents_when_block=false -cpp_indent_lambda_braces_when_parameter=true -cpp_indent_goto_labels=one_left -cpp_indent_preprocessor=leftmost_column -cpp_indent_access_specifiers=false -cpp_indent_namespace_contents=true -cpp_indent_preserve_comments=false -cpp_new_line_before_open_brace_namespace=ignore -cpp_new_line_before_open_brace_type=ignore -cpp_new_line_before_open_brace_function=ignore -cpp_new_line_before_open_brace_block=ignore -cpp_new_line_before_open_brace_lambda=ignore -cpp_new_line_scope_braces_on_separate_lines=false -cpp_new_line_close_brace_same_line_empty_type=false -cpp_new_line_close_brace_same_line_empty_function=false -cpp_new_line_before_catch=true -cpp_new_line_before_else=true -cpp_new_line_before_while_in_do_while=false -cpp_space_before_function_open_parenthesis=remove -cpp_space_within_parameter_list_parentheses=false -cpp_space_between_empty_parameter_list_parentheses=false -cpp_space_after_keywords_in_control_flow_statements=true -cpp_space_within_control_flow_statement_parentheses=false -cpp_space_before_lambda_open_parenthesis=false -cpp_space_within_cast_parentheses=false -cpp_space_after_cast_close_parenthesis=false -cpp_space_within_expression_parentheses=false -cpp_space_before_block_open_brace=true -cpp_space_between_empty_braces=false -cpp_space_before_initializer_list_open_brace=false -cpp_space_within_initializer_list_braces=true -cpp_space_preserve_in_initializer_list=true -cpp_space_before_open_square_bracket=false -cpp_space_within_square_brackets=false -cpp_space_before_empty_square_brackets=false -cpp_space_between_empty_square_brackets=false -cpp_space_group_square_brackets=true -cpp_space_within_lambda_brackets=false -cpp_space_between_empty_lambda_brackets=false -cpp_space_before_comma=false -cpp_space_after_comma=true -cpp_space_remove_around_member_operators=true -cpp_space_before_inheritance_colon=true -cpp_space_before_constructor_colon=true -cpp_space_remove_before_semicolon=true -cpp_space_after_semicolon=false -cpp_space_remove_around_unary_operator=true -cpp_space_around_binary_operator=insert -cpp_space_around_assignment_operator=insert -cpp_space_pointer_reference_alignment=left -cpp_space_around_ternary_operator=insert -cpp_wrap_preserve_blocks=one_liners diff --git a/.github/.markdownlint.yaml b/.github/.markdownlint.yaml new file mode 100644 index 0000000..fb94039 --- /dev/null +++ b/.github/.markdownlint.yaml @@ -0,0 +1,10 @@ +# Autoformatter friendly markdownlint config (all formatting rules disabled) +default: true +blank_lines: false +bullet: false +html: false +indentation: false +line_length: false +spaces: false +url: false +whitespace: false diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..df4ee72 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +* @z-shell/zannex \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/01_bug_report.yml b/.github/ISSUE_TEMPLATE/01_bug_report.yml new file mode 100644 index 0000000..5a1e6d7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/01_bug_report.yml @@ -0,0 +1,83 @@ +name: "🐞 Bug report" +description: File a bug report +title: "[bug]: " +labels: ["bug 🐞", "triage 📑"] +body: + - type: markdown + attributes: + value: | + First off, thanks for taking the time to contribute! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make will benefit everybody else and are greatly appreciated. + - type: input + id: environment + attributes: + label: Environment + description: > + Please describe your environment e.g: echo "OSTYPE=${OSTYPE} CPUTYPE=$(uname -m) / MACHINE_TYPE=$MACHTYPE ZSH_VERSION=${ZSH_VERSION}" + + It may contain any additional information which would help to reproduce the issue. + placeholder: "OSTYPE=linux-gnu CPUTYPE=x86_64 / MACHINE_TYPE=x86_64 ZSH_VERSION=5.8" + validations: + required: true + - type: textarea + id: expected + attributes: + label: Expected behavior + description: "Please describe the expected behavior" + validations: + required: true + - type: textarea + id: current + attributes: + label: Current behavior + description: "Please describe how the bug manifests" + validations: + required: true + - type: textarea + id: reproduce + attributes: + label: Steps to reproduce + description: "Explain the steps required to duplicate the issue" + validations: + required: true + - type: textarea + id: code-snippet + attributes: + label: Code snippet + description: "Please insert your zshrc or just a short code snippet in concern" + validations: + required: true + - type: textarea + id: additional + attributes: + label: Aditional information + description: "List any other information that is relevant to your issue. For reports and stats run `zi analytics`" + validations: + required: true + - type: checkboxes + attributes: + label: Self-service + description: | + If you feel like you could contribute to this issue, please check the box below. This would tell us and other people looking for contributions that someone's working on it. + If you do check this box, please send a pull request within 7 days so we can still delegate this to someone else. + options: + - label: I'd be willing to address this documentation request myself. + - type: checkboxes + attributes: + label: Have you read the Contributing Guidelines? + options: + - label: I have read the [Contributing Guidelines](https://github.com/z-shell/community/blob/main/docs/CONTRIBUTING_GUIDELINES.md). + required: true + - type: checkboxes + attributes: + label: Are you familiar with Contributor Covenant Code of Conduct? + options: + - label: I have read the [Contributor Covenant Code of Conduct](https://github.com/z-shell/zi/blob/main/docs/CODE_OF_CONDUCT.md). + required: true + - type: input + id: contact + attributes: + label: Contact Details + description: How can we get in touch with you if we need more info? + placeholder: ex. email@example.com + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..c5001a6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,18 @@ +--- +blank_issues_enabled: true +contact_links: + - name: ZI Wiki + url: https://z.digitalclouds.dev + about: Knowledge base. + - name: Community Discussions + url: https://github.com/orgs/z-shell/discussions + about: Please ask and answer questions here. + - name: Slack Workspace + url: https://join.slack.com/t/z-shell/shared_invite/zt-16twpopd2-p08ROUeT2aGZ5njJwysawA + about: Join to ask and answer questions or collaborate. + - name: Crowdin Translations + url: https://digitalclouds.crowdin.com/z-shell + about: Join to participate in translations. + - name: Z-Shell Portfolio + url: https://github.zshell.dev/ + about: Z-Shell organization portfolio and governance. diff --git a/.github/workflows/sync-labels.yml b/.github/workflows/sync-labels.yml new file mode 100644 index 0000000..b9b9843 --- /dev/null +++ b/.github/workflows/sync-labels.yml @@ -0,0 +1,12 @@ +--- +name: "♻️ Sync Labels" + +on: + schedule: + - cron: "22 2 * * 2" + workflow_dispatch: + +jobs: + labels: + name: "♻️ Sync labels" + uses: z-shell/.github/.github/workflows/sync-labels.yml@main diff --git a/.github/workflows/trunk_check.yml b/.github/workflows/trunk_check.yml new file mode 100644 index 0000000..c49c615 --- /dev/null +++ b/.github/workflows/trunk_check.yml @@ -0,0 +1,18 @@ +--- +name: "⭕ Trunk" +on: + push: + branches: [main] + tags: ["v*.*.*"] + pull_request: + types: [opened, synchronize] + workflow_dispatch: + +jobs: + check: + name: "⚡" + uses: z-shell/.github/.github/workflows/trunk.yml@main + secrets: + trunk-token: ${{ secrets.TRUNK_TOKEN }} + with: + arguments: "--no-progress" diff --git a/.trunk/.gitignore b/.trunk/.gitignore new file mode 100644 index 0000000..466e248 --- /dev/null +++ b/.trunk/.gitignore @@ -0,0 +1 @@ +out/ \ No newline at end of file diff --git a/.trunk/trunk.yaml b/.trunk/trunk.yaml new file mode 100644 index 0000000..84bcd66 --- /dev/null +++ b/.trunk/trunk.yaml @@ -0,0 +1,19 @@ +version: 0.1 +cli: + version: 0.13.1-beta +repo: + repo: + host: github.com + owner: z-shell + name: z-a-default-ice +lint: + linters: + - name: markdownlint + command: + [markdownlint, -q, --config, .github/.markdownlint.yaml, "${target}"] + direct_configs: [.github/.markdownlint.yaml] + enabled: + - actionlint@1.6.13 + - gitleaks@8.8.7 + - markdownlint@0.31.1 + - prettier@2.6.2 diff --git a/.vscode/settings.json b/.vscode/settings.json index 93d9db4..5faba64 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,5 +1,34 @@ { "conventionalCommits.scopes": [ - "workspace" - ] + "maintenance", + "workspace", + "community", + "general", + "theme", + "CI" + ], + "markdownlint.config": { + "extends": ".github/.markdownlint.yaml" + }, + "files.associations": { + "*za-default*": "zsh" + }, + "shellcheck.ignorePatterns": { + "**/*.xonshrc": true, + "**/*.xsh": true, + "**/*.zsh": true, + "**/*.zshrc": true, + "**/zshrc": true, + "**/*.zprofile": true, + "**/zprofile": true, + "**/*.zlogin": true, + "**/zlogin": true, + "**/*.zlogout": true, + "**/zlogout": true, + "**/*.zshenv": true, + "**/zshenv": true, + "**/*.zsh-theme": true, + "**/*za-*": true + }, + "shellformat.useEditorConfig": true } diff --git a/docs/README.md b/docs/README.md index 0238a2d..3af3a17 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,53 +1,28 @@ -
- -
- -

ZI Logo -❮ ZI ❯ Annex - Test

-

An annex that runs tests via make or zunit

If any found – after installing and updating -a plugin or snippet.

-
-Preview -
- -### Install - -Zunit install if missing: - -```zsh -zi for @zunit -``` +
+

+ + Logo + ❮ ZI ❯ Annex - Test

+

An annex that runs tests via make or zunit

If any found – after installing and updating a plugin or snippet

+

zi annex test

+

-```zsh -zi light z-shell/z-a-test -``` +## 💡 Wiki: [test](https://z.digitalclouds.dev/ecosystem/annexes/test) - [annexes](https://z.digitalclouds.dev/ecosystem/annexes) -## Configuration +## Install -To run the tests in a verbose mode, issue: +Install Zunit as meta-plugin if it is missing: -```zsh -zstyle :zi:annex:test quiet 0 +```shell +zi light-mode for z-shell/z-a-meta-plugins @zunit ``` -before installing or updating the plugin. To skip tests for a single plugin, -add `notest` ice: - -```zsh -zi ice notest -zi load … +```shell +zi light z-shell/z-a-test ``` -### Examples - -Example activation in the default quiet mode: - -![z-a-test activation](https://raw.githubusercontent.com/z-shell/z-a-test/main/docs/images/z-p-test-1.png) - -Example activation in non-quiet mode: - -![z-a-test activation](https://raw.githubusercontent.com/z-shell/z-a-test/main/docs/images/z-p-test-2.png) +This installs the annex and makes the annex ready to use. --- -This repository is compatible with [ZI](https://github.com/z-shell-zi) +This repository compatible with [ZI](https://github.com/z-shell/zi) diff --git "a/functions/\342\206\222za-test-handler" "b/functions/\342\206\222za-test-handler" old mode 100644 new mode 100755 diff --git "a/functions/\342\206\222za-test-make-targets" "b/functions/\342\206\222za-test-make-targets" old mode 100644 new mode 100755 diff --git a/z-a-test.plugin.zsh b/z-a-test.plugin.zsh old mode 100644 new mode 100755