From 8c58bc6dc4cb76b8af89d6943efb99893b19938a Mon Sep 17 00:00:00 2001 From: Petro Shvayko Date: Thu, 29 Aug 2024 15:50:29 +0300 Subject: [PATCH 1/4] feat: add fail fast to `checkmate` stage of CI/CD --- .github/workflows/standard_rust_push.yml | 4 +++- module/move/willbe/template/workflow/standard_rust_push.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/standard_rust_push.yml b/.github/workflows/standard_rust_push.yml index d2fd96bae2..32845cd9c9 100644 --- a/.github/workflows/standard_rust_push.yml +++ b/.github/workflows/standard_rust_push.yml @@ -77,7 +77,7 @@ jobs : continue-on-error: true - name: Check the modules dependencies run: cargo +nightly udeps --all-targets --manifest-path ${{ inputs.manifest_path }} - continue-on-error: true + continue-on-error: false # release: # if: contains( inputs.commit_message, '+test' ) || contains( inputs.commit_message, 'merge' ) @@ -125,6 +125,8 @@ jobs : # run: cargo miri test --manifest-path ${{ inputs.manifest_path }} will_test : + needs: + - checkmate if : contains( inputs.commit_message, '+test' ) || inputs.commiter_username == 'web-flow' || startsWith( inputs.commit_message, 'merge' ) concurrency : group : standard_rust_push_${{ inputs.module_name }}_${{ github.ref }}_${{ matrix.os }} diff --git a/module/move/willbe/template/workflow/standard_rust_push.yml b/module/move/willbe/template/workflow/standard_rust_push.yml index d2fd96bae2..074de9dfac 100644 --- a/module/move/willbe/template/workflow/standard_rust_push.yml +++ b/module/move/willbe/template/workflow/standard_rust_push.yml @@ -77,7 +77,7 @@ jobs : continue-on-error: true - name: Check the modules dependencies run: cargo +nightly udeps --all-targets --manifest-path ${{ inputs.manifest_path }} - continue-on-error: true + continue-on-error: false # release: # if: contains( inputs.commit_message, '+test' ) || contains( inputs.commit_message, 'merge' ) @@ -125,6 +125,8 @@ jobs : # run: cargo miri test --manifest-path ${{ inputs.manifest_path }} will_test : + needs : + - checkmate if : contains( inputs.commit_message, '+test' ) || inputs.commiter_username == 'web-flow' || startsWith( inputs.commit_message, 'merge' ) concurrency : group : standard_rust_push_${{ inputs.module_name }}_${{ github.ref }}_${{ matrix.os }} From 2a75dd63c8a57c34f3a30da1024040f25c759902 Mon Sep 17 00:00:00 2001 From: Petro Shvayko Date: Thu, 29 Aug 2024 16:02:09 +0300 Subject: [PATCH 2/4] +test --- module/move/willbe/template/workflow/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/move/willbe/template/workflow/Readme.md b/module/move/willbe/template/workflow/Readme.md index 52ce58143f..fd179bd8e3 100644 --- a/module/move/willbe/template/workflow/Readme.md +++ b/module/move/willbe/template/workflow/Readme.md @@ -9,7 +9,7 @@ actions: - install nightly rust - install willbe - run tests with all features, but only on stable toolchain and in debug optimization mode - +z Groups creates by strategy: ```yml for_pr_rust_push_${{ inputs.module_name }}_${{ github.ref }}_ From 8a70e1413b3bde71d2d8c0b0727af8be65d864a0 Mon Sep 17 00:00:00 2001 From: Petro Shvayko Date: Thu, 29 Aug 2024 16:05:23 +0300 Subject: [PATCH 3/4] revert --- module/move/willbe/template/workflow/Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/move/willbe/template/workflow/Readme.md b/module/move/willbe/template/workflow/Readme.md index fd179bd8e3..52ce58143f 100644 --- a/module/move/willbe/template/workflow/Readme.md +++ b/module/move/willbe/template/workflow/Readme.md @@ -9,7 +9,7 @@ actions: - install nightly rust - install willbe - run tests with all features, but only on stable toolchain and in debug optimization mode -z + Groups creates by strategy: ```yml for_pr_rust_push_${{ inputs.module_name }}_${{ github.ref }}_ From cf4c2445e6a86351b78dd519b861eaf1bd1c575e Mon Sep 17 00:00:00 2001 From: Petro Shvayko Date: Thu, 29 Aug 2024 17:56:59 +0300 Subject: [PATCH 4/4] feat: add comments --- .github/workflows/standard_rust_push.yml | 2 ++ module/move/willbe/template/workflow/standard_rust_push.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/standard_rust_push.yml b/.github/workflows/standard_rust_push.yml index 32845cd9c9..310c7fa765 100644 --- a/.github/workflows/standard_rust_push.yml +++ b/.github/workflows/standard_rust_push.yml @@ -77,6 +77,7 @@ jobs : continue-on-error: true - name: Check the modules dependencies run: cargo +nightly udeps --all-targets --manifest-path ${{ inputs.manifest_path }} +# This part means that all previous steps will be executed and workflow will not stop if they fail, but not this one. continue-on-error: false # release: @@ -125,6 +126,7 @@ jobs : # run: cargo miri test --manifest-path ${{ inputs.manifest_path }} will_test : +# This section ensures that `job` `will_test` will only be executed after `checkmate` and if `checkmate` fails, no tests will be run. needs: - checkmate if : contains( inputs.commit_message, '+test' ) || inputs.commiter_username == 'web-flow' || startsWith( inputs.commit_message, 'merge' ) diff --git a/module/move/willbe/template/workflow/standard_rust_push.yml b/module/move/willbe/template/workflow/standard_rust_push.yml index 074de9dfac..2f6103ebc2 100644 --- a/module/move/willbe/template/workflow/standard_rust_push.yml +++ b/module/move/willbe/template/workflow/standard_rust_push.yml @@ -77,6 +77,7 @@ jobs : continue-on-error: true - name: Check the modules dependencies run: cargo +nightly udeps --all-targets --manifest-path ${{ inputs.manifest_path }} + # This part means that all previous steps will be executed and workflow will not stop if they fail, but not this one. continue-on-error: false # release: @@ -125,6 +126,7 @@ jobs : # run: cargo miri test --manifest-path ${{ inputs.manifest_path }} will_test : +# This section ensures that `job` `will_test` will only be executed after `checkmate` and if `checkmate` fails, no tests will be run. needs : - checkmate if : contains( inputs.commit_message, '+test' ) || inputs.commiter_username == 'web-flow' || startsWith( inputs.commit_message, 'merge' )