Skip to content

Commit 0128035

Browse files
committed
Repository maintenance
1 parent 33b85fc commit 0128035

File tree

8 files changed

+114
-7
lines changed

8 files changed

+114
-7
lines changed

.github/renovate.json

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
{
2-
"extends": [
3-
"config:base"
4-
]
2+
"extends": ["config:base"]
53
}

.github/workflows/trunk-check.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: "⭕ Trunk"
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ["v*.*.*"]
7+
pull_request:
8+
types: [opened, synchronize]
9+
workflow_dispatch: {}
10+
11+
jobs:
12+
check:
13+
name: ""
14+
uses: z-shell/.github/.github/workflows/trunk.yml@main

.github/workflows/zsh-n.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
---
2+
name: "✅ Zsh"
3+
on:
4+
push:
5+
tags: ["v*.*.*"]
6+
branches:
7+
- main
8+
- next
9+
paths:
10+
- "*.zsh"
11+
- "functions/*"
12+
pull_request:
13+
paths:
14+
- "*.zsh"
15+
- "functions/*"
16+
workflow_dispatch: {}
17+
18+
jobs:
19+
zsh-matrix:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
matrix: ${{ steps.set-matrix.outputs.matrix }}
23+
steps:
24+
- name: ⤵️ Check out code from GitHub
25+
uses: actions/checkout@v3
26+
- name: "⚡ Set matrix output"
27+
id: set-matrix
28+
run: |
29+
MATRIX="$(find . -type d -name 'doc' -prune -o -type f \( -iname '*.zsh' -o -iname '@str-*' \) -print | jq -ncR '{"include": [{"file": inputs}]}')"
30+
echo "MATRIX=${MATRIX}" >&2
31+
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
32+
zsh-n:
33+
runs-on: ubuntu-latest
34+
needs: zsh-matrix
35+
strategy:
36+
fail-fast: false
37+
matrix: ${{ fromJSON(needs.zsh-matrix.outputs.matrix) }}
38+
steps:
39+
- name: ⤵️ Check out code from GitHub
40+
uses: actions/checkout@v3
41+
- name: "⚡ Install dependencies"
42+
run: sudo apt update && sudo apt-get install -yq zsh
43+
- name: "⚡ zsh -n: ${{ matrix.file }}"
44+
env:
45+
ZSH_FILE: ${{ matrix.file }}
46+
run: |
47+
zsh -n "${ZSH_FILE}"
48+
- name: "⚡ zcompile ${{ matrix.file }}"
49+
env:
50+
ZSH_FILE: ${{ matrix.file }}
51+
run: |
52+
zsh -fc "zcompile ${ZSH_FILE}"; rc=$?
53+
ls -al "${ZSH_FILE}.zwc"; exit "$rc"

.github/workflows/zunit.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ name: 🛡️ ZUnit
33
on:
44
workflow_dispatch:
55
push:
6-
branches: [ main ]
6+
branches: [main]
77
pull_request_target:
8-
branches: [ main ]
8+
branches: [main]
99

1010
jobs:
1111
build-macos:

.trunk/.gitignore

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
*out
2+
*logs
3+
*actions
4+
*notifications
5+
plugins
6+
user_trunk.yaml
7+
user.yaml

.trunk/configs/.markdownlint.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Autoformatter friendly markdownlint config (all formatting rules disabled)
2+
default: true
3+
blank_lines: false
4+
bullet: false
5+
html: false
6+
indentation: false
7+
line_length: false
8+
spaces: false
9+
url: false
10+
whitespace: false

.trunk/trunk.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
version: 0.1
2+
cli:
3+
version: 1.3.1
4+
plugins:
5+
sources:
6+
- id: trunk
7+
ref: v0.0.8
8+
uri: https://github.com/trunk-io/plugins
9+
lint:
10+
enabled:
11+
- markdownlint@0.33.0
12+
- actionlint@1.6.22
13+
- gitleaks@8.15.2
14+
- git-diff-check
15+
- prettier@2.8.3
16+
runtimes:
17+
enabled:
18+
- go@1.18.3
19+
- node@18.12.1
20+
actions:
21+
enabled:
22+
- trunk-announce
23+
- trunk-check-pre-push
24+
- trunk-fmt-pre-commit
25+
- trunk-upgrade-available

docs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ array=( "" "a value" "test" )
239239
240240
Output:
241241
242-
```
242+
```sh
243243
''
244244
a\ value
245245
test
@@ -252,7 +252,7 @@ typeset -A hash=( "a key" "a value" key value )
252252
253253
Output:
254254
255-
```
255+
```sh
256256
a\ key: a\ value
257257
key: value
258258
```

0 commit comments

Comments
 (0)