Skip to content

Commit 899f68b

Browse files
authored
Performance (#34)
* refactor: ⚡️ allow optional | rm dups/err * [maintenance]: Upgrade trunk & Update README * chore: 🚀 chromas tab < 2 Signed-off-by: Salvydas Lukosius <sall@w-ss.io>
1 parent 8131533 commit 899f68b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+3276
-5981
lines changed

.editorconfig

Lines changed: 1 addition & 299 deletions
Large diffs are not rendered by default.

.github/workflows/zsh-n.yml

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

.github/workflows/zunit.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,21 @@ name: 🛡️ ZUnit
44
on:
55
workflow_dispatch:
66
push:
7-
branches: ["main", "develop"]
7+
paths:
8+
- "**/*.ch"
9+
- "**/*.zsh"
10+
- "tests/*"
11+
- "share/*"
12+
- "themes/*"
13+
- "functions/*"
814
pull_request_target:
9-
branches: ["main", "develop"]
15+
paths:
16+
- "**/*.ch"
17+
- "**/*.zsh"
18+
- "tests/*"
19+
- "share/*"
20+
- "themes/*"
21+
- "functions/*"
1022

1123
jobs:
1224
build-macos:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ test/res
88
hold/*
99
*.zwc
1010
._zi
11+
out.parse
1112

1213
### Vim
1314
# Swap

.trunk/.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
*out
22
*logs
3-
external
3+
*actions
4+
*notifications
5+
plugins
6+
user_trunk.yaml
7+
user.yaml

.github/.markdownlint.yaml renamed to .trunk/configs/.markdownlint.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,3 @@ line_length: false
88
spaces: false
99
url: false
1010
whitespace: false
11-
MD041: false

.trunk/configs/.shellcheckrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
enable=all
2+
source-path=SCRIPTDIR
3+
disable=SC2154
4+
5+
# If you're having issues with shellcheck following source, disable the errors via:
6+
# disable=SC1090
7+
# disable=SC1091

.trunk/trunk.yaml

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
version: 0.1
22
cli:
3-
version: 0.15.1-beta
4-
repo:
5-
repo:
6-
host: github.com
7-
owner: z-shell
8-
name: F-Sy-H
3+
version: 1.3.2
4+
plugins:
5+
sources:
6+
- id: trunk
7+
ref: v0.0.8
8+
uri: https://github.com/trunk-io/plugins
99
lint:
10-
linters:
11-
- name: markdownlint
12-
command:
13-
[markdownlint, -q, --config, .github/.markdownlint.yaml, "${target}"]
14-
direct_configs: [.github/.markdownlint.yaml]
1510
enabled:
16-
- git-diff-check@SYSTEM
17-
- actionlint@1.6.15
18-
- gitleaks@8.9.0
19-
- markdownlint@0.32.1
20-
- prettier@2.7.1
11+
- gitleaks@8.15.3
12+
- shellcheck@0.9.0
13+
- git-diff-check
14+
- actionlint@1.6.23
2115
- shfmt@3.5.0
16+
- markdownlint@0.33.0
17+
- oxipng@8.0.0
18+
- prettier@2.8.3
2219
ignore:
2320
- linters: [ALL]
2421
paths:
2522
- "share/test/**"
23+
runtimes:
24+
enabled:
25+
- go@1.18.3
26+
- node@18.12.1
27+
actions:
28+
enabled:
29+
- trunk-announce
30+
- trunk-check-pre-push
31+
- trunk-fmt-pre-commit
32+
- trunk-upgrade-available

.vscode/settings.json

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
{
2-
"conventionalCommits.scopes": [
3-
"maintenance",
4-
"workspace",
5-
"general",
6-
"theme"
7-
],
8-
"markdownlint.config": {
9-
"extends": ".github/.markdownlint.yaml"
2+
"files.associations": {
3+
"*za-*": "shellscript",
4+
".ch": "shellscript",
5+
"fast-*": "shellscript",
6+
".fast-*": "shellscript"
107
}
118
}

.zunit.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
tap: false
22
directories:
33
tests: tests
4-
output: tests/_output
5-
support: tests/_support
64
time_limit: 0
75
fail_fast: false
86
allow_risky: false

0 commit comments

Comments
 (0)