Skip to content

Commit

Permalink
Repository maintenance
Browse files Browse the repository at this point in the history
  • Loading branch information
ss-o committed Jan 14, 2023
1 parent 33b85fc commit 0128035
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
{
"extends": [
"config:base"
]
"extends": ["config:base"]
}
14 changes: 14 additions & 0 deletions .github/workflows/trunk-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
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
53 changes: 53 additions & 0 deletions .github/workflows/zsh-n.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: "✅ Zsh"
on:
push:
tags: ["v*.*.*"]
branches:
- main
- next
paths:
- "*.zsh"
- "functions/*"
pull_request:
paths:
- "*.zsh"
- "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 '@str-*' \) -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"
4 changes: 2 additions & 2 deletions .github/workflows/zunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: 🛡️ ZUnit
on:
workflow_dispatch:
push:
branches: [ main ]
branches: [main]
pull_request_target:
branches: [ main ]
branches: [main]

jobs:
build-macos:
Expand Down
7 changes: 7 additions & 0 deletions .trunk/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*out
*logs
*actions
*notifications
plugins
user_trunk.yaml
user.yaml
10 changes: 10 additions & 0 deletions .trunk/configs/.markdownlint.yaml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions .trunk/trunk.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
version: 0.1
cli:
version: 1.3.1
plugins:
sources:
- id: trunk
ref: v0.0.8
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- [email protected]
- [email protected]
- [email protected]
- git-diff-check
- [email protected]
runtimes:
enabled:
- [email protected]
- [email protected]
actions:
enabled:
- trunk-announce
- trunk-check-pre-push
- trunk-fmt-pre-commit
- trunk-upgrade-available
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ array=( "" "a value" "test" )
Output:
```
```sh
''
a\ value
test
Expand All @@ -252,7 +252,7 @@ typeset -A hash=( "a key" "a value" key value )
Output:
```
```sh
a\ key: a\ value
key: value
```

0 comments on commit 0128035

Please sign in to comment.