From fb1da368e1531891c27a9143eec589b3c9d6277b Mon Sep 17 00:00:00 2001 From: Jens Tirsvad Nielsen Date: Tue, 13 Oct 2026 15:26:23 +0800 Subject: [PATCH] Add the continuous integration workflow Task: MIL-001#6 --- .gitea/workflows/ci.yml | 45 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..69f1a30 --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,45 @@ +# Continuous integration for the Weather Data project (day 25). +# +# 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 and write only into pytest's temporary folders. +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