ci: Improve GitHub Action modularity (#18861)

- Closes: https://github.com/zed-industries/zed/issues/19351
- Switch to using the official [typos GitHub Action](https://github.com/crate-ci/typos/blob/master/docs/github-action.md)
- Move the typos check into `actions/check_style`
- Move Squawk Postgres migration check out of `actions/check_style` file into ci.yml
- `actions/check_style` can now be run on stateless/linux runners (previous required self-hosted MacOS runner)
- ci.yml: Split old `style` into checks into those that can run statelessly (linux) and everything else into a new `migration` group which benefit from the full git checkout available on the MacOS runners.
- ci.yml: Move `Check unused dependencies` from style to `linux_tests`
- Add `if: github.repository_owner == 'zed-industries'` to all jobs so they won't try and run on GitHub forks.
This commit is contained in:
Peter Tripp 2024-10-17 12:50:19 -04:00 committed by GitHub
parent 65fb2782eb
commit 4ae2f93086
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 42 additions and 39 deletions

View file

@ -1,14 +0,0 @@
#!/bin/sh
set -eu
TYPOS_CLI_VERSION=1.24.6
TARGET_DIR=${1:-""}
if ! cargo install --list | grep "typos-cli v$TYPOS_CLI_VERSION" > /dev/null; then
echo "Installing typos-cli@$TYPOS_CLI_VERSION..."
cargo install "typos-cli@$TYPOS_CLI_VERSION"
else
echo "typos-cli@$TYPOS_CLI_VERSION is already installed."
fi
typos $TARGET_DIR