Skip to content

Commit 7ebe852

Browse files
authored
chore(repo): update tooling and tests (#31)
* chore(repo): update tooling and tests * chore(dirty): provide a dirty fix for ec checks for now * fix: disable checks for old versions for now * fix: warn Darwin_arm64 users that version < 0.25.0 are not supported * fixup * tests: adjust test suite * docs: update README
1 parent 2b3af87 commit 7ebe852

22 files changed

+507
-77
lines changed

.editorconfig

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Unix-style newlines with a newline ending every file
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
max_line_length = 120
14+
trim_trailing_whitespace = true
15+
16+
# 4 space indentation
17+
# don't check for max_line_length, rely on pylint
18+
[*.py]
19+
indent_style = space
20+
indent_size = 4
21+
max_line_length = unset
22+
23+
[Makefile]
24+
indent_style = tab
25+
max_line_length = unset
26+
27+
[*.mk]
28+
indent_style = tab
29+
max_line_length = unset
30+
31+
[*.{yml,yaml}]
32+
indent_size = 2
33+
indent_style = space
34+
max_line_length = unset
35+
36+
# Fix for json files
37+
[*.json]
38+
max_line_length = unset
39+
40+
[*.md]
41+
trim_trailing_whitespace = false
42+
max_line_length = unset
43+
indent_size = unset
44+
45+
[LICENSE]
46+
max_line_length = unset
47+
indent_style = unset
48+
indent_size = unset
49+
50+
[*.txt]
51+
max_line_length = unset
52+
53+
[*.{sh,bats,bash}]
54+
max_line_length = unset

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @looztra

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ""
5+
labels: bug
6+
assignees: ""
7+
---
8+
9+
## Describe the bug
10+
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
## Steps to reproduce
14+
15+
<!-- Steps to reproduce the behavior: -->
16+
17+
## Expected behavior
18+
19+
<!-- A clear and concise description of what you expected to happen. -->
20+
21+
## Screenshots
22+
23+
<!-- If applicable, add screenshots to help explain your problem. -->
24+
25+
## Additional context
26+
27+
<!-- Add any other context about the problem here. -->
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ""
5+
labels: enhancement
6+
assignees: ""
7+
---
8+
9+
## Is your feature request related to a problem? Please describe.
10+
11+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
12+
13+
## Describe the solution you'd like
14+
15+
<!-- A clear and concise description of what you want to happen. -->
16+
17+
## Describe alternatives you've considered
18+
19+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
20+
21+
## Additional context
22+
23+
<!-- Add any other context or screenshots about the feature request here. -->

.github/pull_request_template.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Description
2+
3+
## What this PR Provides
4+
5+
<!--- Why is this change required? What problem does it solve? -->
6+
<!--- If it fixes an open issue, please link to the issue here. -->
7+
8+
## Types of changes
9+
10+
<!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
11+
12+
- [ ] Bug fix (non-breaking change which fixes an issue)
13+
- [ ] New feature (non-breaking change which adds functionality)
14+
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
15+
- [ ] Documentation
16+
- [ ] Chore (gha, tools, pre-commit)
17+
- [ ] Tests
18+
19+
## Usage examples
20+
21+
<!--- Provide examples of intended usage -->
22+
23+
## How Has This Been Tested?
24+
25+
<!--- Please describe in detail how you tested your changes. -->
26+
27+
## Checklist
28+
29+
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
30+
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
31+
32+
- [ ] I have updated the documentation accordingly.
33+
- [ ] I have added tests to cover my changes.

.github/workflows/aio.yml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/code_checks.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
name: Code checks
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
pull_request:
10+
branches:
11+
- main
12+
- master
13+
workflow_dispatch:
14+
15+
concurrency:
16+
group: ${{ github.ref }}-${{ github.workflow }}-checks
17+
cancel-in-progress: true
18+
19+
jobs:
20+
plugin_test:
21+
strategy:
22+
matrix:
23+
os:
24+
- macos-latest
25+
- ubuntu-latest
26+
runs-on: ${{ matrix.os }}
27+
steps:
28+
- name: asdf_plugin_test default
29+
uses: asdf-vm/actions/plugin-test@v3
30+
with:
31+
command: k9s --help
32+
33+
- name: Checkout code
34+
uses: actions/checkout@v4
35+
36+
- name: Install Tools with asdf
37+
uses: asdf-vm/actions/install@v3
38+
39+
- name: Test plugin with bats
40+
run: |
41+
asdf plugin-add k9s "${GITHUB_WORKSPACE}"
42+
bats test
43+
44+
lint_and_tests:
45+
runs-on: ubuntu-latest
46+
steps:
47+
- name: Checkout code
48+
uses: actions/checkout@v4
49+
50+
- name: Install Tools with asdf
51+
uses: asdf-vm/actions/install@v3
52+
53+
- uses: actions/cache@v4
54+
with:
55+
path: ~/.cache/pre-commit
56+
key: pre-commit-3|${{ hashFiles('.pre-commit-config.yaml') }}
57+
58+
- name: Run pre-commit checks
59+
shell: bash
60+
run: |
61+
pre-commit run --all-files

.github/workflows/lint_pr_title.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Semantic Pull Request checks
3+
4+
on:
5+
pull_request_target:
6+
types:
7+
- opened
8+
- edited
9+
- synchronize
10+
11+
jobs:
12+
validate-pr-title:
13+
name: Validate PR title
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: amannn/action-semantic-pull-request@v5
17+
id: lint_pr_title
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
requireScope: true
22+
- uses: marocchino/sticky-pull-request-comment@v2
23+
# When the previous steps fails, the workflow would stop. By adding this
24+
# condition you can continue the execution with the populated error message.
25+
if: always() && (steps.lint_pr_title.outputs.error_message != null)
26+
with:
27+
header: pr-title-lint-error
28+
message: |
29+
Hey dear contributors ! 👋🏼
30+
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
31+
Error details:
32+
```
33+
${{ steps.lint_pr_title.outputs.error_message }}
34+
```
35+
36+
# Delete a previous comment when the issue has been resolved
37+
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
38+
uses: marocchino/sticky-pull-request-comment@v2
39+
with:
40+
header: pr-title-lint-error
41+
delete: true

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Release
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
10+
permissions:
11+
contents: write
12+
pull-requests: write
13+
14+
jobs:
15+
release-please:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: GoogleCloudPlatform/release-please-action@v4
19+
with:
20+
release-type: simple
21+
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Worflows checks
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
- master
9+
pull_request:
10+
11+
jobs:
12+
repo-checks:
13+
name: Check the repository github actions workflows
14+
timeout-minutes: 10
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout current branch
19+
uses: actions/checkout@v4
20+
21+
- name: Run actionlint
22+
uses: reviewdog/action-actionlint@v1
23+
with:
24+
fail_on_error: true

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vscode/

.markdownlint-cli2.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
globs:
3+
- '**/*.md'
4+
- '!.venv*/**/*.md'
5+
- '!CHANGELOG.md'

.markdownlint.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
# For a list of all rules, see here: https://github.com/markdownlint/markdownlint/blob/master/docs/RULES.md
3+
4+
# Default state for all rules
5+
default: true
6+
7+
# MD013/line-length - Line length
8+
MD013: false
9+
10+
# MD024/Multiple headings with the same content
11+
MD024: false
12+
13+
# MD026/no-trailing-punctuation - Trailing punctuation in heading
14+
MD026: false
15+
16+
# MD033/no-inline-html - Inline HTML
17+
MD033: false
18+
19+
# MD037/Spaces inside emphasis markers
20+
MD037: false

0 commit comments

Comments
 (0)