Skip to content
Merged
Show file tree
Hide file tree
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: 28 additions & 2 deletions .github/workflows/lint_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ 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 @@ -24,11 +31,30 @@ 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: |
ruff check $(git-ls '*.py')
if [ -s files.txt ]; then
ruff check $(cat files.txt)
else
echo "Skipping ruff; no Python files found."
fi

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

Binary file added Preview_button.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Pull Request Template

## 📝 Instructions
Before you add a summary to your pull request, click on the `Preview` button in GitHub to see how your selected template will appear:
![Preview button](Preview_button.png)

Please choose the appropriate template based on the nature of your changes. Use one of the following templates:

- **[Code Changes Template](https://github.com/PyCeas/Pyceas/compare/main?expand=1&template=code_pr_template.md)**
Expand All @@ -9,8 +12,9 @@ Please choose the appropriate template based on the nature of your changes. Use
- **[Asset Changes](https://github.com/PyCeas/Pyceas/compare/main?expand=1&template=asset_pr_template.md)**
- **[Audio Changes](https://github.com/PyCeas/Pyceas/compare/main?expand=1&template=audio_pr_template.md)**

> ![IMPORTANT]
> [!IMPORTANT]
> When creating a pull request, make sure the base branch is set to `main`. If you are working from a different branch, you can update the target branch > in the pull request interface.
>


---
Expand Down