mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-23 23:13:42 +02:00
fix: add back linting workflow lost during merge
This commit is contained in:
parent
b2bd9d0b52
commit
de007d4cb7
57
.github/workflows/linting.yml
vendored
57
.github/workflows/linting.yml
vendored
@ -6,13 +6,13 @@ on:
|
|||||||
- main
|
- main
|
||||||
- beta
|
- beta
|
||||||
- release
|
- release
|
||||||
- 'hotfix*'
|
- "hotfix*"
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- beta
|
- beta
|
||||||
- release
|
- release
|
||||||
- 'hotfix*'
|
- "hotfix*"
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
|
|
||||||
@ -63,12 +63,59 @@ jobs:
|
|||||||
run: pnpm typecheck:scripts
|
run: pnpm typecheck:scripts
|
||||||
id: typecheck-scripts
|
id: typecheck-scripts
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
|
||||||
|
# NOTE: This step *must* run as the last linter; it deletes files in `public/`
|
||||||
# NOTE: This step *must* run last, as it deletes files in `public/`
|
|
||||||
# Files in public/ do not yet have full licensing information, so remove them before checking for reuse compliance
|
# Files in public/ do not yet have full licensing information, so remove them before checking for reuse compliance
|
||||||
- name: Prepare for reuse compliance
|
- name: Prepare for reuse compliance
|
||||||
run: rm -rf public/* LICENSES/LicenseRef-*
|
run: rm -rf public/* LICENSES/LicenseRef-*
|
||||||
|
|
||||||
- name: Check for reuse compliance
|
- name: Check for reuse compliance
|
||||||
|
id: reuse-lint
|
||||||
uses: fsfe/reuse-action@v5
|
uses: fsfe/reuse-action@v5
|
||||||
|
|
||||||
|
- name: Evaluate for Errors
|
||||||
|
env:
|
||||||
|
BIOME_LINT_OUTCOME: ${{ steps.biome_lint.outcome }}
|
||||||
|
DEPCRUISE_OUTCOME: ${{ steps.depcruise.outcome }}
|
||||||
|
TYPECHECK_OUTCOME: ${{ steps.typecheck.outcome }}
|
||||||
|
TYPECHECK_SCRIPTS_OUTCOME: ${{ steps.typecheck-scripts.outcome }}
|
||||||
|
REUSE_OUTCOME: ${{ steps.reuse-lint.outcome }}
|
||||||
|
run: |
|
||||||
|
# Check for Errors
|
||||||
|
|
||||||
|
# Make text red.
|
||||||
|
red () {
|
||||||
|
printf "\e[31m%s\e[0m" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Make text green.
|
||||||
|
green () {
|
||||||
|
printf "\e[32m%s\e[0m" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
print_result() {
|
||||||
|
local name=$1
|
||||||
|
local outcome=$2
|
||||||
|
if [ "$outcome" == "success" ]; then
|
||||||
|
printf "$(green "✅ $name: $outcome")\n"
|
||||||
|
else
|
||||||
|
printf "$(red "❌ $name: $outcome")\n"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
print_result "Biome" "$BIOME_LINT_OUTCOME"
|
||||||
|
print_result "Depcruise" "$DEPCRUISE_OUTCOME"
|
||||||
|
print_result "Typecheck" "$TYPECHECK_OUTCOME"
|
||||||
|
print_result "Typecheck scripts" "$TYPECHECK_SCRIPTS_OUTCOME"
|
||||||
|
print_result "Reuse Compliance" "$REUSE_OUTCOME"
|
||||||
|
|
||||||
|
if [[ "$BIOME_LINT_OUTCOME" != "success" || \
|
||||||
|
"$DEPCRUISE_OUTCOME" != "success" || \
|
||||||
|
"$TYPECHECK_OUTCOME" != "success" || \
|
||||||
|
"$TYPECHECK_SCRIPTS_OUTCOME" != "success" || \
|
||||||
|
"$REUSE_OUTCOME" != "success" ]]; then
|
||||||
|
printf "$(red "❌ One or more checks failed!")\n" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
printf "$(green "✅ All checks passed!")\n"
|
||||||
|
Loading…
Reference in New Issue
Block a user