Initial commit with example #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Check | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup just | |
uses: extractions/setup-just@v3 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v6 | |
- name: Download actionlint | |
shell: bash | |
run: | | |
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | |
pwd >> "$GITHUB_PATH" | |
- name: Format | |
run: | | |
just format | |
- name: Lint | |
run: | | |
just lint | |
- name: Diff Check | |
shell: bash | |
run: | | |
set -e | |
if ! git diff --quiet HEAD; then | |
printf 'These files changed when running the command:\n\n' | |
git diff --name-only | while read -r n ; do | |
echo "* \`$n\`" | |
done | |
exit 1 | |
fi |