Skip to content

armgit / core

Public Imported from GitHub
0

100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps

Align skip conditions for other env workflows with review (#2831)

Koend756014f08d9
diff --git a/.github/workflows/custom-review.yml b/.github/workflows/custom-review.yml
index b17d6a2b3..3fd673370 100644
--- a/.github/workflows/custom-review.yml
+++ b/.github/workflows/custom-review.yml
@@ -42,23 +42,31 @@ jobs:
install-dist:
name: Build
needs: detect-changes
- if: needs.detect-changes.outputs.any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/install-dist.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}
unit-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/unit-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
integration-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/integration-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
# code-coverage:
# name: Test
# needs: [detect-changes, unit-tests, integration-tests]
- # if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ # if: ${{ !failure() && !cancelled() }}
# uses: "./.github/workflows/code-coverage.yml"
+ # with:
+ # skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
diff --git a/.github/workflows/custom-staging.yml b/.github/workflows/custom-staging.yml
index 3c5a70ffa..acaebcbae 100644
--- a/.github/workflows/custom-staging.yml
+++ b/.github/workflows/custom-staging.yml
@@ -42,26 +42,31 @@ jobs:
install-dist:
name: Build
needs: detect-changes
- if: needs.detect-changes.outputs.any_modified == 'true'
uses: "./.github/workflows/install-dist.yml"
unit-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/unit-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
integration-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/integration-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
# code-coverage:
# name: Test
# needs: [detect-changes, unit-tests, integration-tests]
- # if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ # if: ${{ !failure() && !cancelled() }}
# uses: "./.github/workflows/code-coverage.yml"
+ # with:
+ # skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
# deployment:
# name: Deploy
diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml
index 09690fb41..2189b6ead 100644
--- a/.github/workflows/staging.yml
+++ b/.github/workflows/staging.yml
@@ -84,20 +84,26 @@ jobs:
ui-check-dependencies:
name: Lint
needs: detect-changes
- if: needs.detect-changes.outputs.ui_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/ui-check-dependencies.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.ui_any_modified != 'true' }}
ui-check-outdated-translations:
name: Lint
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/ui-check-outdated-translations.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
install-browsers:
name: Build
needs: detect-changes
- if: needs.detect-changes.outputs.any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/install-browsers.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}
install-dist:
name: Build
@@ -109,39 +115,47 @@ jobs:
unit-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/unit-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
integration-tests:
name: Test
needs: detect-changes
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/integration-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
code-coverage:
name: Test
needs: [detect-changes, unit-tests, integration-tests]
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/code-coverage.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.backend_any_modified != 'true' }}
ui-component-tests:
name: Test
needs: [detect-changes, install-dist, install-browsers]
- if: needs.detect-changes.outputs.ui_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/ui-component-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.ui_any_modified != 'true' }}
ui-app-tests:
name: Test
needs: [detect-changes, install-dist, install-browsers]
- if: needs.detect-changes.outputs.any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/ui-app-tests.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}
build-manager-image:
name: Build
needs: [detect-changes, install-dist, unit-tests, integration-tests, ui-check-outdated-translations, ui-component-tests, ui-app-tests]
- if: | # If a dependency isn't successful (e.g. skipped) the condition isn't evaluated without always()
- always() &&
- !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/build-manager-image.yml"
with:
tags: ${{ needs.detect-changes.outputs.dockerTags }}
@@ -157,9 +171,7 @@ jobs:
publish-maven:
name: Publish
needs: [detect-changes, install-dist, unit-tests, integration-tests, ui-check-outdated-translations, ui-component-tests, ui-app-tests]
- if: | # If a dependency isn't successful (e.g. skipped) the condition isn't evaluated without always()
- always() &&
- !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/publish-maven.yml"
secrets:
MAVEN_SIGNING_PASSWORD: ${{ secrets._TEMP_MAVEN_SIGNING_PASSWORD }}
@@ -170,9 +182,7 @@ jobs:
publish-npm:
name: Publish
needs: [detect-changes, install-dist, unit-tests, integration-tests, ui-check-outdated-translations, ui-component-tests, ui-app-tests]
- if: | # If a dependency isn't successful (e.g. skipped) the condition isn't evaluated without always()
- always() &&
- !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/publish-npm.yml"
with:
tag: ${{ needs.install-dist.outputs.npmTag }}
@@ -182,9 +192,7 @@ jobs:
deployment:
name: Deploy
needs: [detect-changes, unit-tests, integration-tests, ui-check-outdated-translations, ui-component-tests, ui-app-tests]
- if: | # If a dependency isn't successful (e.g. skipped) the condition isn't evaluated without always()
- always() &&
- !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled')
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/deployment.yml"
with:
INPUTS: ${{ toJSON(inputs) }}