Repository: pywbem/pywbemtools (language: python)

Issue:
Split safety run into separate make target and moved to end of test



Discussion / hints:

Fix patch:
diff --git a/Makefile b/Makefile
index e0b7b5e7..02fd256a 100644
--- a/Makefile
+++ b/Makefile
@@ -342,11 +342,12 @@ help:
 	@echo "  build      - Build the distribution archive files in: $(dist_dir)"
 	@echo "  buildwin   - Build the Windows installable in: $(dist_dir) (requires Windows 64-bit)"
 	@echo "  builddoc   - Build documentation in: $(doc_build_dir)"
-	@echo "  check      - Run PyLint and Flake8 on sources and save results in: pylint.log and flake8.log"
+	@echo "  check      - Run Flake8 on sources"
 	@echo "  pylint     - Run PyLint on sources"
 	@echo "  test       - Run unit and function tests"
 	@echo "               Env.var TESTCASES can be used to specify a py.test expression for its -k option"
 	@echo "  installtest - Run install tests"
+	@echo "  safety     - Run Safety on sources"
 	@echo "  end2endtest - Run end2end tests (in tests/end2endtest)"
 	@echo "               Env.var TEST_SERVER_IMAGE can be used to specify the Docker image with the WBEM server"
 	@echo "  all        - Do all of the above (except buildwin when not on Windows)"
@@ -505,13 +506,17 @@ flake8: flake8_$(pymn)_$(PACKAGE_LEVEL).done
 	@echo 'Makefile: Target $@ done.'
 
 .PHONY: check
-check: flake8_$(pymn)_$(PACKAGE_LEVEL).done safety_$(pymn)_$(PACKAGE_LEVEL).done
+check: flake8_$(pymn)_$(PACKAGE_LEVEL).done
 	@echo "Makefile: Target $@ done."
 
 .PHONY: pylint
 pylint: pylint_$(pymn)_$(PACKAGE_LEVEL).done
 	@echo "Makefile: Target $@ done."
 
+.PHONY: safety
+safety: safety_$(pymn)_$(PACKAGE_LEVEL).done
+	@echo "Makefile: Target $@ done."
+
 .PHONY: todo
 todo: todo_$(pymn)_$(PACKAGE_LEVEL).done
 	@echo "Makefile: Target $@ done."
diff --git a/docs/changes.rst b/docs/changes.rst
index 9c00f0b5..a9ecf8dd 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -34,6 +34,9 @@ Released: not yet
 
 **Enhancements:**
 
+* Split safety run out of "check" make target ino a separate "safety" make target
+  and moved its run to the end of the test workflow.
+
 **Cleanup:**
 
 * Change to used safety-policy-file .safety-policy-yml to keep the safety issue


Test patch:
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 415a86a7..18db1e8c 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -318,6 +318,11 @@ jobs:
         PACKAGE_LEVEL: ${{ matrix.package_level }}
       run: |
         make installtest
+    - name: Run safety
+      env:
+        PACKAGE_LEVEL: ${{ matrix.package_level }}
+      run: |
+        make safety
 
   test_finish:
     needs: test