From 19e8defbd153a0992a0c4d3143a05f15be409635 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 20 Jul 2023 19:11:27 +0200 Subject: [PATCH 1/6] Add sphinx-lint to the ci workflow and Makefile. --- .github/workflows/ci.yml | 3 +++ Makefile | 8 +++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8d8a26561..8808987733 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,3 +14,6 @@ jobs: - name: Validate run: VERSION=${{ github.event.pull_request.base.ref }} MODE=dummy make all + + - name: Lint + run: make lint diff --git a/Makefile b/Makefile index 3f9c041ab0..9bec946727 100644 --- a/Makefile +++ b/Makefile @@ -69,6 +69,8 @@ $(VENV)/bin/activate: $(VENV)/bin/sphinx-build: $(VENV)/bin/activate . $(VENV)/bin/activate; python3 -m pip install sphinx python-docs-theme +$(VENV)/bin/sphinx-lint: $(VENV)/bin/activate + . $(VENV)/bin/activate; python3 -m pip install sphinx-lint $(VENV)/bin/blurb: $(VENV)/bin/activate . $(VENV)/bin/activate; python3 -m pip install blurb @@ -76,7 +78,7 @@ $(VENV)/bin/blurb: $(VENV)/bin/activate .PHONY: upgrade_venv upgrade_venv: $(VENV)/bin/activate ## Upgrade the venv that compiles the doc - . $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb + . $(VENV)/bin/activate; python3 -m pip install --upgrade sphinx python-docs-theme blurb sphinx-lint .PHONY: progress @@ -130,3 +132,7 @@ fuzzy: ## Find fuzzy strings .PHONY: rm_cpython rm_cpython: ## Remove cloned cpython repo rm -rf $(CPYTHON_CLONE) + +.PHONY: lint +lint: $(VENV)/bin/sphinx-lint ## Run sphinx-lint + $(VENV)/bin/sphinx-lint . From 6f7d53bc69ebfcee2904948531f6867c7ae3822b Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 22 Jul 2023 01:59:28 +0200 Subject: [PATCH 2/6] Move the lint check before the Validate step. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8808987733..d9c6114d2a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,11 +9,11 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Lint + run: make lint + - name: Install Dependencies run: sudo apt-get install gettext - name: Validate run: VERSION=${{ github.event.pull_request.base.ref }} MODE=dummy make all - - - name: Lint - run: make lint From f25795501e70ee83b6a5054c3dbd4fd35f107897 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 22 Jul 2023 01:59:45 +0200 Subject: [PATCH 3/6] Enable the `default-role` check. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 9bec946727..f94587c4fe 100644 --- a/Makefile +++ b/Makefile @@ -135,4 +135,4 @@ rm_cpython: ## Remove cloned cpython repo .PHONY: lint lint: $(VENV)/bin/sphinx-lint ## Run sphinx-lint - $(VENV)/bin/sphinx-lint . + $(VENV)/bin/sphinx-lint --enable default-role From c5462a963001bea358ff737677a354bee901dc7f Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Sat, 22 Jul 2023 02:20:04 +0200 Subject: [PATCH 4/6] Add a `push` trigger to the CI workflow. --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d9c6114d2a..0e7b8016de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,6 +2,7 @@ name: build on: pull_request: + push: jobs: ci: From dd21235c664dcfafa3c9def011bdc235eda1468e Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 12 Oct 2023 09:15:37 +0200 Subject: [PATCH 5/6] Remove linting step from ci.yml --- .github/workflows/ci.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0e7b8016de..181d4c4ae7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,9 +10,6 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Lint - run: make lint - - name: Install Dependencies run: sudo apt-get install gettext From f918d65ea29db9fcf755e599eb1c4b0038de06d1 Mon Sep 17 00:00:00 2001 From: Ezio Melotti Date: Thu, 12 Oct 2023 09:16:09 +0200 Subject: [PATCH 6/6] Remove push trigger from ci.yml --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 181d4c4ae7..d8d8a26561 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,6 @@ name: build on: pull_request: - push: jobs: ci: