Skip to content

Check if condition and needs input for pr-builder #218

Check if condition and needs input for pr-builder

Check if condition and needs input for pr-builder #218

Workflow file for this run

name: prs
on:
pull_request:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
with:
scandir: "./tools"
ignore_paths: "**.py"
- name: Check Permissions
run: |
# Executable bit indices
USER_EXEC_IND=3
GROUP_EXEC_IND=6
ELSE_EXEC_IND=9
for FILE in tools/*; do
PERMISSIONS=$(stat -c "%A" "${FILE}")
for IND in "${USER_EXEC_IND}" "${GROUP_EXEC_IND}" "${ELSE_EXEC_IND}"; do
EXEC_PERM="${PERMISSIONS:$IND:1}"
if [ "${EXEC_PERM}" != "x" ]; then
ls -l tools/
echo ""
echo "${FILE} does not have the correct permissions."
echo "Ensure are tools are executable by everyone and try again."
exit 1
fi
done
done
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Run pytest
run: |
pip install pytest
pytest tests