Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 2 additions & 28 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

# - name: Exit if not Pyceaas repository
# run: |
# if [ "${{ github.repository }}" != "PyCeas/Pyceas" ]; then
# echo "Not running in PyCeas repository. Exiting."
# exit 0
# fi

- name: Set up Python
uses: actions/setup-python@v5
with:
Expand All @@ -31,30 +24,11 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install ruff mypy pygame-ce pytmx

- name: Check for Python files
id: check_files
run: |
git ls-files '*.py' > files.txt
if [ ! -s files.txt ]; then
echo "No Python files found. Skipping lint and type-check."
fi

- name: Run ruff
if: success()
run: |
if [ -s files.txt ]; then
ruff check $(cat files.txt)
else
echo "Skipping ruff; no Python files found."
fi
ruff check $(git-ls '*.py')

- name: Run mypy
if: success()
run: |
if [ -s files.txt ]; then
mypy $(cat files.txt)
else
echo "Skipping mypy; no Python files found."
fi

mypy main.py
Loading