Feature/php 8.3 #20
This file contains 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
--- | |
# ------------------------------------------------------------------------------------------------- | |
# Job Name | |
# ------------------------------------------------------------------------------------------------- | |
name: Lint | |
# ------------------------------------------------------------------------------------------------- | |
# When to run | |
# ------------------------------------------------------------------------------------------------- | |
on: | |
# Runs on Pull Requests | |
pull_request: | |
# Runs on master Branch and Tags | |
push: | |
branches: | |
- master | |
# ------------------------------------------------------------------------------------------------- | |
# What to run | |
# ------------------------------------------------------------------------------------------------- | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
name: "[Lint]" | |
steps: | |
# ------------------------------------------------------------ | |
# Checkout repository | |
# ------------------------------------------------------------ | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Lint | |
shell: bash | |
run: | | |
retry() { | |
for n in $(seq ${RETRIES}); do | |
echo "[${n}/${RETRIES}] ${*}"; | |
if eval "${*}"; then | |
echo "[SUCC] ${n}/${RETRIES}"; | |
return 0; | |
fi; | |
sleep ${PAUSE}; | |
echo "[FAIL] ${n}/${RETRIES}"; | |
done; | |
return 1; | |
} | |
cd .tests/ | |
retry make lint-tests | |
env: | |
RETRIES: 20 | |
PAUSE: 10 | |
- name: Update Readme | |
shell: bash | |
run: | | |
retry() { | |
for n in $(seq ${RETRIES}); do | |
echo "[${n}/${RETRIES}] ${*}"; | |
if eval "${*}"; then | |
echo "[SUCC] ${n}/${RETRIES}"; | |
return 0; | |
fi; | |
sleep ${PAUSE}; | |
echo "[FAIL] ${n}/${RETRIES}"; | |
done; | |
return 1; | |
} | |
cd .tests/ | |
retry make update-readme | |
git diff --quiet || { echo "Build Changes"; git diff; git status; false; }; | |
env: | |
RETRIES: 20 | |
PAUSE: 10 | |
- name: Check configuration | |
shell: bash | |
run: | | |
retry() { | |
for n in $(seq ${RETRIES}); do | |
echo "[${n}/${RETRIES}] ${*}"; | |
if eval "${*}"; then | |
echo "[SUCC] ${n}/${RETRIES}"; | |
return 0; | |
fi; | |
sleep ${PAUSE}; | |
echo "[FAIL] ${n}/${RETRIES}"; | |
done; | |
return 1; | |
} | |
cp env-example .env | |
sed -i'' "s/^NEW_UID=.*/NEW_UID=$(id -u)/g" .env | |
sed -i'' "s/^NEW_GID=.*/NEW_GID=$(id -g)/g" .env | |
retry ./check-config.sh | |
env: | |
RETRIES: 20 | |
PAUSE: 10 |