Skip to content

Commit

Permalink
Performance (#34)
Browse files Browse the repository at this point in the history
* refactor: ⚡️ allow optional | rm dups/err

* [maintenance]: Upgrade trunk & Update README

* chore: 🚀 chromas tab < 2

Signed-off-by: Salvydas Lukosius <sall@w-ss.io>
  • Loading branch information
ss-o authored Jan 25, 2023
1 parent 8131533 commit 899f68b
Show file tree
Hide file tree
Showing 105 changed files with 3,276 additions and 5,981 deletions.
300 changes: 1 addition & 299 deletions .editorconfig

Large diffs are not rendered by default.

57 changes: 57 additions & 0 deletions .github/workflows/zsh-n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: "✅ Zsh"
on:
push:
paths:
- "**/*.ch"
- "**/*.zsh"
- "tests/*"
- "share/*"
- "themes/*"
- "functions/*"
pull_request:
paths:
- "**/*.ch"
- "**/*.zsh"
- "tests/*"
- "share/*"
- "themes/*"
- "functions/*"
workflow_dispatch: {}

jobs:
zsh-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: "⚡ Set matrix output"
id: set-matrix
run: |
MATRIX="$(find . -type d -name 'doc' -prune -o -type f \( -iname '*.zsh' -o -iname '*.ch' -o -iname 'fast-*' \) -print | jq -ncR '{"include": [{"file": inputs}]}')"
echo "MATRIX=${MATRIX}" >&2
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT
zsh-n:
runs-on: ubuntu-latest
needs: zsh-matrix
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.zsh-matrix.outputs.matrix) }}
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@v3
- name: "⚡ Install dependencies"
run: sudo apt update && sudo apt-get install -yq zsh
- name: "⚡ zsh -n: ${{ matrix.file }}"
env:
ZSH_FILE: ${{ matrix.file }}
run: |
zsh -n "${ZSH_FILE}"
- name: "⚡ zcompile ${{ matrix.file }}"
env:
ZSH_FILE: ${{ matrix.file }}
run: |
zsh -fc "zcompile ${ZSH_FILE}"; rc=$?
ls -al "${ZSH_FILE}.zwc"; exit "$rc"
16 changes: 14 additions & 2 deletions .github/workflows/zunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,21 @@ name: 🛡️ ZUnit
on:
workflow_dispatch:
push:
branches: ["main", "develop"]
paths:
- "**/*.ch"
- "**/*.zsh"
- "tests/*"
- "share/*"
- "themes/*"
- "functions/*"
pull_request_target:
branches: ["main", "develop"]
paths:
- "**/*.ch"
- "**/*.zsh"
- "tests/*"
- "share/*"
- "themes/*"
- "functions/*"

jobs:
build-macos:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ test/res
hold/*
*.zwc
._zi
out.parse

### Vim
# Swap
Expand Down
6 changes: 5 additions & 1 deletion .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
*out
*logs
external
*actions
*notifications
plugins
user_trunk.yaml
user.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,3 @@ line_length: false
spaces: false
url: false
whitespace: false
MD041: false
7 changes: 7 additions & 0 deletions .trunk/configs/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
enable=all
source-path=SCRIPTDIR
disable=SC2154

# If you're having issues with shellcheck following source, disable the errors via:
# disable=SC1090
# disable=SC1091
39 changes: 23 additions & 16 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
version: 0.1
cli:
version: 0.15.1-beta
repo:
repo:
host: github.com
owner: z-shell
name: F-Sy-H
version: 1.3.2
plugins:
sources:
- id: trunk
ref: v0.0.8
uri: https://github.com/trunk-io/plugins
lint:
linters:
- name: markdownlint
command:
[markdownlint, -q, --config, .github/.markdownlint.yaml, "${target}"]
direct_configs: [.github/.markdownlint.yaml]
enabled:
- git-diff-check@SYSTEM
- actionlint@1.6.15
- gitleaks@8.9.0
- markdownlint@0.32.1
- prettier@2.7.1
- gitleaks@8.15.3
- shellcheck@0.9.0
- git-diff-check
- actionlint@1.6.23
- shfmt@3.5.0
- markdownlint@0.33.0
- oxipng@8.0.0
- prettier@2.8.3
ignore:
- linters: [ALL]
paths:
- "share/test/**"
runtimes:
enabled:
- go@1.18.3
- node@18.12.1
actions:
enabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-upgrade-available
13 changes: 5 additions & 8 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
{
"conventionalCommits.scopes": [
"maintenance",
"workspace",
"general",
"theme"
],
"markdownlint.config": {
"extends": ".github/.markdownlint.yaml"
"files.associations": {
"*za-*": "shellscript",
".ch": "shellscript",
"fast-*": "shellscript",
".fast-*": "shellscript"
}
}
2 changes: 0 additions & 2 deletions .zunit.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
tap: false
directories:
tests: tests
output: tests/_output
support: tests/_support
time_limit: 0
fail_fast: false
allow_risky: false
Loading

0 comments on commit 899f68b

Please sign in to comment.