MIL-001: Project foundation #23

Merged
Tirsvad merged 10 commits from mil-001-project-foundation into main 2026-10-08 11:51:36 +02:00
Showing only changes of commit 3e16f718a6 - Show all commits
+46
View File
@@ -0,0 +1,46 @@
# Continuous integration for the Snake Game.
#
# Run by Gitea Actions. The file lives in .gitea/workflows, not in
# .github/workflows: GitHub refuses a push that touches .github/workflows from a
# token without the workflow scope, and that blocks the push mirror to GitHub.
# Runs the same checks as the README, "Run the tests".
#
# The tests need no display: `snake_game.snake` does not import `turtle` until a
# real segment is created, and the tests pass fakes.
name: CI
on:
push:
pull_request:
permissions:
contents: read
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install
run: |
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"
- name: Tests
run: python -m pytest
- name: Lint
run: python -m ruff check src tests
- name: Format check
run: python -m ruff format --check src tests
- name: Types
run: python -m mypy