* maint: Ignore .idea folder
Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>
* fix: Don't escape exclamation marks in hook keys
Exclamation marks (per default) get escaped in interactive mode,
but not in non-interactive modes. In this case it meant that zinit
would not find any hooks which implements the ices when running in
non-interactive mode (e.g. in a script). This in turn would NOT result
in errors but would just silently not execute any of the ices which
of course would be a bad thing(tm).
https://github.com/zdharma-continuum/zinit/issues/199 has the details...
Closes: #199
* fix: Ignore errors if cp cannot copy .zwc files
This would otherwise bubble up as a hook failure and further up as a zinit call failure
* fix: Add pick ice now that the compile hook is run
After the fix, the compile hook is now run and would fail without this information. IN addition, only files starting with _ are linked into the completion folder.
* fix: Fix docker-buildx gh-r test now that atclone ice is run
* maint: Add basic tests for cp/mv/atclone/make ices
zunit runs tests non-interactively and these tests fail without the fix in this branch.
Co-authored-by: Philipp Schmitt <pschmitt@users.noreply.github.com>
- Ability to run unit tests without Docker
- Define a Z-unit \_support/bootstrap script defining the isolated test
environment in a temp dir via `mktemp -d`, to ensure a clean test
environment.
- GH actions workflow now tests macOS & Windows and bumps Ubuntu to the
latest.
- GH actions workflow leverages Homebrew to simplify installing zsh &
zunit
- Condense Z-unit GH workflow into more organized build matrix. It
avoids creating a new environment per test file as some test files
only have one or two tests.
- Change or remove logic in the `setup` and `teardown` functions to
commands which apply to type of tests being run (e.g., `gh-r` setup
sets defualt ice `gh-r` and `nocompile`).
- Expand tests for testing `gh-r` on Linux & macOS for ensuring correct
release selection.
- Correct GH workflow `on` conditions to avoid duplicating jobs.
- Update `gh-r` ice logic to be smarter about selecting a release for
the current system.
- Expand linting to include the tools `shfmt`, `shellcheck`, and
`mdformat`
- Rudimentary testing for all Zinit annexes (e.g., install with no
errors)
| Test | Before | Now |
| :------: | :----: | :-: |
| annexes | 3 | 10 |
| gh-r | 3 | 95 |
| plugins | 2 | 3 |
| snippets | 4 | 4 |
<img width="841" alt="Screen Shot 2022-04-23 at 21 57 08" src="https://user-images.githubusercontent.com/10052309/164954220-123a8dc5-0399-41e3-b9cf-98b2cf599145.png">
Signed-off-by: Vladislav Doster <mvdoster@gmail.com>