Compare commits

...
Author SHA1 Message Date
Tirsvad da7efc1120 Resolve pending commit links
Tests / Run the tests (pull_request) Successful in 58s
2026-10-13 16:29:28 +08:00
Tirsvad e406d65f6a Record RC-031 and RC-032: CI lint steps reviewed
No issue closed: review records for #39.
2026-10-13 16:29:27 +08:00
Tirsvad 51e546e9f5 Merge pull request 'Run yamllint and actionlint in CI' (#39) from ci-lint-steps into main
Tests / Run the tests (push) Canceled after 0s
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Successful in 7s
2026-10-13 10:29:21 +02:00
Tirsvad 16811c53fa Wrap the workflow header comment to the yamllint line limit
Tests / Run the tests (pull_request) Successful in 49s
2026-10-13 16:27:26 +08:00
Tirsvad 7c2604108c Run yamllint and actionlint in CI
Tests / Run the tests (pull_request) Canceled after 0s
No issue closed: CI change requested by S01.
2026-10-13 16:27:09 +08:00
Tirsvad 9b063bf58f Merge pull request 'Add yamllint and actionlint to the dev extra' (#38) from dev-lint-tools into main
Tests / Run the tests (push) Successful in 50s
TirSystem/github-action: Publish wiki / publish-wiki (push) Successful in 7s
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Successful in 5s
2026-10-13 10:26:07 +02:00
Tirsvad fbf73fc6d7 Add yamllint and actionlint to the dev extra
Tests / Run the tests (pull_request) Successful in 50s
No issue closed: dev tooling change requested by S01.
2026-10-13 16:24:31 +08:00
Tirsvad 0bbf4c22d4 Merge pull request 'Close the conditions of RC-007 and RC-010 in their Version History' (#37) from rc-history-rows into main
Tests / Run the tests (push) Successful in 44s
TirSystem/github-action: Sync GitHub mirror metadata / sync-metadata (push) Successful in 5s
2026-10-13 10:22:31 +02:00
11 changed files with 213 additions and 101 deletions
+53 -46
View File
@@ -1,46 +1,53 @@
# Continuous integration for the squirrel census project: runs the pytest tests
# on Python 3.13 for every push and pull request. Read by Gitea Actions (a
# runner must be registered for the repository). It changes nothing outside the
# repository and uses no secret. Decision: MIL-001 task "Add CI workflow".
# Host: Gitea Actions; uses only github.* contexts, so it also runs on GitHub.
name: Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
PIP_VERSION: "26.2.1"
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
name: Run the tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the code
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Create the virtual environment and install
run: |
python -m venv .venv
.venv/bin/python -m pip install --upgrade "pip==${PIP_VERSION}"
.venv/bin/python -m pip install -e ".[dev]"
- name: Run the tests
run: .venv/bin/python -m pytest
# Continuous integration for the squirrel census project: lints the YAML and
# workflow files and runs the pytest tests on Python 3.13 for every push and
# pull request. Read by Gitea Actions (a runner must be registered for the
# repository). It changes nothing outside the repository and uses no secret.
# Decision: MIL-001 task "Add CI workflow".
# Host: Gitea Actions; uses only github.* contexts, so it also runs on GitHub.
name: Tests
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
env:
PYTHON_VERSION: "3.13"
PIP_VERSION: "26.2.1"
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
jobs:
pytest:
name: Run the tests
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out the code
uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v5.6.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Create the virtual environment and install
run: |
python -m venv .venv
.venv/bin/python -m pip install --upgrade "pip==${PIP_VERSION}"
.venv/bin/python -m pip install -e ".[dev]"
- name: Lint the YAML files
run: .venv/bin/python -m yamllint -c .yamllint.yml .gitea .yamllint.yml
- name: Lint the workflow files
run: .venv/bin/actionlint .gitea/workflows/*.yml
- name: Run the tests
run: .venv/bin/python -m pytest
+3
View File
@@ -6,3 +6,6 @@ rules:
max: 100
truthy:
check-keys: false
# Line endings are normalised by git (LF in the repository, CRLF in some
# Windows checkouts), so the rule would fail on a local checkout only.
new-lines: disable
+3 -2
View File
@@ -20,7 +20,7 @@ There are no runtime dependencies: the program uses only the Python standard lib
## Set up
Create a local virtual environment named `.venv` in the project folder, upgrade `pip`
and install the project with its development tools (pytest, ruff, mypy).
and install the project with its development tools (pytest, ruff, mypy, yamllint, actionlint).
### Windows powershell
@@ -90,7 +90,8 @@ it is present.
The workflow [`.gitea/workflows/ci.yml`][ci] runs for every push to `main` and for every
pull request. It sets up Python 3.13, creates a `.venv`, upgrades `pip`, installs the
project with `.[dev]` and runs `python -m pytest`. It uses `github.*` contexts only, so
project with `.[dev]`, lints the YAML and workflow files with `yamllint` and
`actionlint`, and runs `python -m pytest`. It uses `github.*` contexts only, so
it also runs on GitHub Actions.
## Build the source documentation
+1 -1
View File
@@ -16,7 +16,7 @@ document of a type. `Primary File` may contain a glob (e.g.
| PP | Project Plan | docs/project-plan.md | 002 |
| MIL | Milestone / Gateway | docs/milestones/*.md | 005 |
| ADR | Architecture Decision Record | docs/adr/adr-NNNN-*.md | 0002 |
| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 031 |
| RC | SQA Review Record | docs/sqa/reviews/rc-*.md | 033 |
| DICT | Domain Dictionary | docs/dictionary.md | 002 |
| TM | Traceability Matrix | docs/sqa/traceability-matrix.md | 002 |
| UCD | Use Case Diagram | docs/use-case-diagram.md | 002 |
@@ -0,0 +1,48 @@
# RC Review of ci.yml, delta re-review for the lint steps (YAML)
## Metadata
| Key | Value |
| --- | --- |
| ID | RC-031 |
| CrossReference | [WF-MIL-001], [QC-YML-001] |
## Version History
| Date | Status | Author | Reviewer | Change | Commit |
| --- | --- | --- | --- | --- | --- |
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [e406d65] |
---
## Artifact Under Review
- Instance reviewed: [WF-MIL-001]
- Checklist used: [QC-YML-001]
- Scope: delta re-review of criteria 3, 7, 10 and 15 of QC-YML-001: two lint steps added to ci.yml; earlier record RC-009
- Language and domain: n/a
- Language reviewer: none (the stand-in reviewer reads English and the `it` domain)
- Mode: autonomous, not independent (reviewer: AI as stand-in for S01)
## Checklist Results
| # | Criterion | Status | Evidence/Notes |
| --- | --- | --- | --- |
| 3 | Passes `yamllint` (or the project's YAML linter) with its configuration committed next to the code and no unexplained `disable` comments (Mandatory) | Pass | `yamllint 1.38.0` with `.yamllint.yml` runs in CI on `.gitea` and `.yamllint.yml`; no errors. `new-lines` is disabled with a comment because git normalises line endings. |
| 7 | Embedded program text (shell, Python, SQL, `jq`, and so on) in a value is at most five lines; a longer one is moved to a file of its own, in its own language, and the YAML calls it (Mandatory) | Pass | The two new `run:` blocks have one line each; the longest block is still 3 lines. |
| 10 | The file validates against the schema of the consuming tool where one exists, and the schema or tool version is stated (Optional) | Pass | `actionlint` validates the workflow schema in CI. |
| 15 | A change is exercised by a check that runs without the real target: a parse and schema test, or a dry run of the consuming tool (Optional) | Pass | yamllint and actionlint now run on every push and pull request without the real target. |
## Overall Verdict
Go — the changed rows pass; the other rows of RC-009 still hold.
## Action Items
| Action | Owner | Due |
| --- | --- | --- |
| None | S01 | - |
---
[WF-MIL-001]: ../../../.gitea/workflows/ci.yml
[QC-YML-001]: ../../../framework/qc/code/qc-yaml.md
[e406d65]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-squirrel/commit/e406d65f6a53332750204ec3fd876ab2daa2bbd2
@@ -0,0 +1,50 @@
# RC Review of ci.yml, delta re-review for the lint steps (workflow)
## Metadata
| Key | Value |
| --- | --- |
| ID | RC-032 |
| CrossReference | [WF-MIL-001], [QC-WF-001] |
## Version History
| Date | Status | Author | Reviewer | Change | Commit |
| --- | --- | --- | --- | --- | --- |
| 2026-10-13 | Accepted | Jens Tirsvad Nielsen | AI as stand-in for S01 | Initial version | [e406d65] |
---
## Artifact Under Review
- Instance reviewed: [WF-MIL-001]
- Checklist used: [QC-WF-001]
- Scope: delta re-review of criteria 5, 6, 17, 20, 22 and 24 of QC-WF-001: two lint steps added; earlier records RC-010, RC-025, RC-030
- Language and domain: n/a
- Language reviewer: none (the stand-in reviewer reads English and the `it` domain)
- Mode: autonomous, not independent (reviewer: AI as stand-in for S01)
## Checklist Results
| # | Criterion | Status | Evidence/Notes |
| --- | --- | --- | --- |
| 5 | Every job and step has a descriptive `name`, unique within its job (Mandatory) | Pass | The new steps are named "Lint the YAML files" and "Lint the workflow files"; step names stay unique. |
| 6 | The file passes `actionlint` (or the project's workflow validation test) and the tool version is stated (Mandatory) | Pass | `actionlint 1.7.12` runs in CI against `.gitea/workflows/*.yml` and passes. |
| 17 | Tools and dependencies are installed at pinned versions; a version is a workflow input with a default or a value in one place (Mandatory) | Pass | `yamllint==1.38.0` and `actionlint-py==1.7.12.25` are exact pins in the dev extra of `pyproject.toml`. |
| 20 | A `run:` block is within the limit on embedded program text of criterion 7 of [QC-YML-001]; a longer script is a file (`tools/`, or a shared repository fetched at a pinned ref) that the step calls with one command, and the workflow passes its settings through `env:` (Mandatory) | Pass | Each new `run:` block is one line. |
| 22 | Every workflow feature used is verified on the instance that runs it, and the host and version are recorded; a feature the target hosts differ on is noted in the header (Mandatory) | Pass | The changed workflow completed with success on Gitea 1.27.3: run 1087 on pull request #39. |
| 24 | A static test of the repository's workflows exists and runs on every pull request: valid YAML, required keys, explicit permissions and runner, no inline script above the limit (Optional) | Pass | `tests/test_workflow.py` still passes (33 tests) with the new steps. |
## Overall Verdict
Go — the changed rows pass; the other rows of RC-010, RC-025 and RC-030 still hold.
## Action Items
| Action | Owner | Due |
| --- | --- | --- |
| None | S01 | - |
---
[WF-MIL-001]: ../../../.gitea/workflows/ci.yml
[QC-WF-001]: ../../../framework/qc/code/qc-workflow.md
[e406d65]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-squirrel/commit/e406d65f6a53332750204ec3fd876ab2daa2bbd2
+3 -1
View File
@@ -42,7 +42,7 @@ updated whenever an artifact instance is created or reviewed.
| `src/squirrel/census.py`, `cli.py`, `__main__.py`, `tests/` | Python Source Code | - | - | [UC-001], [SSD-001], [ADR-0001] | - | [RC-024] |
| `src/squirrel/constants.py`, `tests/test_constants.py` | Python Source Code | - | - | [MIL-001] | - | [RC-008] |
| `tests/test_workflow.py` | Python Source Code | - | - | [MIL-001], [RC-010] | - | [RC-029] |
| `.gitea/workflows/ci.yml` | CI Workflow | - | - | [MIL-001] | - | [RC-009], [RC-010], [RC-025], [RC-030] |
| `.gitea/workflows/ci.yml` | CI Workflow | - | - | [MIL-001] | - | [RC-009], [RC-010], [RC-025], [RC-030], [RC-031], [RC-032] |
## Coverage Notes
@@ -98,3 +98,5 @@ updated whenever an artifact instance is created or reviewed.
[RC-029]: ./reviews/rc-029-python-workflow-test.md
[RC-030]: ./reviews/rc-030-ci-workflow-delta-24.md
[dfaa840]: https://git.tirsystem.com/Tirsvad-Udemy-100-days-of-code/025-squirrel/commit/dfaa8400c3bd24b086a2c3eab1bef1e4e7ea6b45
[RC-031]: ./reviews/rc-031-ci-yaml-lint-steps.md
[RC-032]: ./reviews/rc-032-ci-workflow-lint-steps.md
+49 -48
View File
@@ -1,48 +1,49 @@
# Project configuration for the squirrel census assignment (day 25).
# Read by pip, setuptools and pytest. The decision to use the standard library
# only is recorded in docs/adr/adr-0001-standard-library-instead-of-pandas.md.
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "squirrel"
version = "0.1.0"
description = "Count the squirrels of the 2018 Central Park Squirrel Census by primary fur colour."
readme = "README.md"
requires-python = ">=3.13"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE"]
dependencies = []
classifiers = [
"Programming Language :: Python :: 3.13",
"Intended Audience :: Education",
]
[project.optional-dependencies]
dev = ["pytest==9.1.1", "ruff==0.17.0", "mypy==2.4.0",
"pyyaml==6.0.3", "types-PyYAML==6.0.12.20260906"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
[tool.ruff]
line-length = 88
src = ["src", "tests"]
extend-exclude = ["docs"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "D"]
ignore = ["D203", "D213"]
[tool.mypy]
strict = true
files = ["src", "tests"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
# Project configuration for the squirrel census assignment (day 25).
# Read by pip, setuptools and pytest. The decision to use the standard library
# only is recorded in docs/adr/adr-0001-standard-library-instead-of-pandas.md.
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[project]
name = "squirrel"
version = "0.1.0"
description = "Count the squirrels of the 2018 Central Park Squirrel Census by primary fur colour."
readme = "README.md"
requires-python = ">=3.13"
license = "AGPL-3.0-or-later"
license-files = ["LICENSE"]
dependencies = []
classifiers = [
"Programming Language :: Python :: 3.13",
"Intended Audience :: Education",
]
[project.optional-dependencies]
dev = ["pytest==9.1.1", "ruff==0.17.0", "mypy==2.4.0",
"pyyaml==6.0.3", "types-PyYAML==6.0.12.20260906",
"yamllint==1.38.0", "actionlint-py==1.7.12.25"]
[tool.setuptools.packages.find]
where = ["src"]
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
[tool.ruff]
line-length = 88
src = ["src", "tests"]
extend-exclude = ["docs"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "D"]
ignore = ["D203", "D213"]
[tool.mypy]
strict = true
files = ["src", "tests"]
[tool.ruff.lint.per-file-ignores]
"tests/**" = ["D"]
+1 -1
View File
@@ -2,7 +2,7 @@
# Installation
Projektet kræver **Python 3.13 eller nyere**. Det har ingen kørselsafhængigheder; `pytest`, `ruff` og `mypy` er udviklingsværktøjer.
Projektet kræver **Python 3.13 eller nyere**. Det har ingen kørselsafhængigheder; `pytest`, `ruff`, `mypy`, `yamllint` og `actionlint` er udviklingsværktøjer.
## Windows PowerShell
+1 -1
View File
@@ -2,7 +2,7 @@
# Install
The project needs **Python 3.13 or later**. It has no runtime dependencies; `pytest`, `ruff` and `mypy` are development tools.
The project needs **Python 3.13 or later**. It has no runtime dependencies; `pytest`, `ruff`, `mypy`, `yamllint` and `actionlint` are development tools.
## Windows PowerShell
+1 -1
View File
@@ -2,7 +2,7 @@
# Pemasangan
Projek ini memerlukan **Python 3.13 atau lebih baharu**. Ia tiada kebergantungan masa jalan; `pytest`, `ruff` dan `mypy` ialah alat pembangunan.
Projek ini memerlukan **Python 3.13 atau lebih baharu**. Ia tiada kebergantungan masa jalan; `pytest`, `ruff`, `mypy`, `yamllint` dan `actionlint` ialah alat pembangunan.
## Windows PowerShell