diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index ec8cb71..dde5aea 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -32,6 +32,11 @@ jobs: fetch-depth: 0 # pull full history for page lastmod by git commit date submodules: recursive + - name: Run tests + run: | + apk add python3 + python3 -m unittest discover -s tests -v + - name: Patch baseURL (staging only) if: github.ref_name != 'main' run: | diff --git a/tests/test_brand_lint.py b/tests/test_brand_lint.py index bbb3a54..4435be9 100644 --- a/tests/test_brand_lint.py +++ b/tests/test_brand_lint.py @@ -31,18 +31,18 @@ class BrandLintTest(unittest.TestCase): ) def test_errors_include_spelling_and_source_line(self): - result = self.build("---\ntitle: Hackertours\n---\nHACKERTOURS and hackertours\n") + result = self.build("---\ntitle: HackerTours\n---\nHACKERTOURS and hackertours\n") self.assertNotEqual(result.returncode, 0) - for line, spelling in [(2, "Hackertours"), (4, "HACKERTOURS"), (4, "hackertours")]: + for line, spelling in [(2, "HackerTours"), (4, "HACKERTOURS"), (4, "hackertours")]: self.assertIn(f':{line}: "{spelling}" should be "Hackertours"', result.stderr) def test_valid_names_identifiers_and_explicit_exceptions(self): result = self.build( "---\n" - "title: Hackertours # hackertours-lint-ignore\n" + "title: HackerTours # hackertours-lint-ignore\n" "---\n" "Hackertours\n" - "Hackertours \n" + "HackerTours \n" "[Shop](https://hackertours.example/hackertours) " "ticket@hackertours.example @hackertours " "#easterhegg-hackertours:example.org\n" @@ -52,12 +52,12 @@ class BrandLintTest(unittest.TestCase): def test_marker_only_ignores_its_own_line(self): result = self.build( "---\ntitle: Hackertours\n---\n" - "Hackertours \n" - "Hackertours\n" + "HackerTours \n" + "HackerTours\n" ) self.assertNotEqual(result.returncode, 0) - self.assertIn(':5: "Hackertours" should be "Hackertours"', result.stderr) - self.assertNotIn(':4: "Hackertours" should be "Hackertours"', result.stderr) + self.assertIn(':5: "HackerTours" should be "Hackertours"', result.stderr) + self.assertNotIn(':4: "HackerTours" should be "Hackertours"', result.stderr) if __name__ == "__main__":