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 with branch protection checks (#2820)

Koen828a86a62bf8
diff --git a/.github/workflows/build-deployment-image.yml b/.github/workflows/build-deployment-image.yml
index 991b5bef6..a4314d447 100644
--- a/.github/workflows/build-deployment-image.yml
+++ b/.github/workflows/build-deployment-image.yml
@@ -4,6 +4,10 @@ name: Build deployment image
on:
workflow_call:
inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
tag:
type: string
required: true
@@ -11,6 +15,7 @@ on:
jobs:
build-deployment-image:
name: Deployment image
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/build-manager-image.yml b/.github/workflows/build-manager-image.yml
index 2730b88a4..053e57389 100644
--- a/.github/workflows/build-manager-image.yml
+++ b/.github/workflows/build-manager-image.yml
@@ -8,6 +8,10 @@ on:
DOCKERHUB_PASSWORD:
required: true
inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
TAGS:
type: string
default: ""
@@ -16,6 +20,7 @@ on:
jobs:
build-manager-image:
name: Manager image
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml
index b8eb583ad..c43feeed3 100644
--- a/.github/workflows/code-coverage.yml
+++ b/.github/workflows/code-coverage.yml
@@ -1,9 +1,16 @@
name: Code Coverage
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
code-coverage:
name: Code Coverage
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/custom-review.yml b/.github/workflows/custom-review.yml
index 3d7f3e18a..7323b27cb 100644
--- a/.github/workflows/custom-review.yml
+++ b/.github/workflows/custom-review.yml
@@ -58,6 +58,6 @@ jobs:
# code-coverage:
# name: Test
- # needs: [unit-tests, integration-tests]
+ # needs: [detect-changes, unit-tests, integration-tests]
# if: needs.detect-changes.outputs.backend_any_modified == 'true'
# uses: "./.github/workflows/code-coverage.yml"
diff --git a/.github/workflows/custom-staging.yml b/.github/workflows/custom-staging.yml
index c0aeb19b2..5f526885b 100644
--- a/.github/workflows/custom-staging.yml
+++ b/.github/workflows/custom-staging.yml
@@ -58,7 +58,7 @@ jobs:
# code-coverage:
# name: Test
- # needs: [unit-tests, integration-tests]
+ # needs: [detect-changes, unit-tests, integration-tests]
# if: needs.detect-changes.outputs.backend_any_modified == 'true'
# uses: "./.github/workflows/code-coverage.yml"
diff --git a/.github/workflows/install-browsers.yml b/.github/workflows/install-browsers.yml
index 2f756e9c8..c8fe10371 100644
--- a/.github/workflows/install-browsers.yml
+++ b/.github/workflows/install-browsers.yml
@@ -1,9 +1,16 @@
name: Install browsers
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
install-browsers:
name: Install browsers
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/install-dist.yml b/.github/workflows/install-dist.yml
index aea1d19f2..562a205e9 100644
--- a/.github/workflows/install-dist.yml
+++ b/.github/workflows/install-dist.yml
@@ -3,6 +3,10 @@ name: Install Dist
on:
workflow_call:
inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
VERSION_WITH_QUALIFIER:
type: string
outputs:
@@ -13,6 +17,7 @@ on:
jobs:
install-dist:
name: Install Dist
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
outputs:
npmTag: ${{ steps.update-package-json.outputs.tag }}
diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml
index 9a2bd4f51..417dcfad0 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -1,9 +1,16 @@
name: Integration Tests
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
integration-tests:
name: Integration Tests
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/publish-npm-dry-run.yml b/.github/workflows/publish-npm-dry-run.yml
index a8c685a01..4b5121092 100644
--- a/.github/workflows/publish-npm-dry-run.yml
+++ b/.github/workflows/publish-npm-dry-run.yml
@@ -1,9 +1,16 @@
name: NPM publish dry run
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
npm-dry-run:
name: NPM publish dry run
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml
index 6c15dbe7a..2e788cec6 100644
--- a/.github/workflows/review.yml
+++ b/.github/workflows/review.yml
@@ -36,62 +36,82 @@ 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
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: [unit-tests, integration-tests]
- if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ needs: [detect-changes, unit-tests, integration-tests]
+ 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]
- if: needs.detect-changes.outputs.any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/build-manager-image.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}
secrets:
DOCKERHUB_USER: ${{ secrets._TEMP_DOCKERHUB_USER }}
DOCKERHUB_PASSWORD: ${{ secrets._TEMP_DOCKERHUB_PASSWORD }}
@@ -99,16 +119,19 @@ jobs:
build-deployment-image: # Only here to check if it can build successfully
name: Build
needs: [detect-changes, install-dist]
- if: needs.detect-changes.outputs.any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/build-deployment-image.yml"
with:
tag: develop
+ skip: ${{ needs.detect-changes.outputs.any_modified != 'true' }}
publish-npm-dry-run:
name: Publish
needs: [detect-changes, install-dist]
- if: needs.detect-changes.outputs.ui_any_modified == 'true'
+ if: ${{ !failure() && !cancelled() }}
uses: "./.github/workflows/publish-npm-dry-run.yml"
+ with:
+ skip: ${{ needs.detect-changes.outputs.ui_any_modified != 'true' }}
get-version-details: # Only here to check if it can build successfully
name: Build / Get version details
diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml
index f9fc90840..79e7511de 100644
--- a/.github/workflows/staging.yml
+++ b/.github/workflows/staging.yml
@@ -125,6 +125,12 @@ jobs:
if: needs.detect-changes.outputs.backend_any_modified == 'true'
uses: "./.github/workflows/integration-tests.yml"
+ code-coverage:
+ name: Test
+ needs: [detect-changes, unit-tests, integration-tests]
+ if: needs.detect-changes.outputs.backend_any_modified == 'true'
+ uses: "./.github/workflows/code-coverage.yml"
+
ui-component-tests:
name: Test
needs: [detect-changes, install-dist, install-browsers]
diff --git a/.github/workflows/ui-app-tests.yml b/.github/workflows/ui-app-tests.yml
index 81cf6b653..17a24c520 100644
--- a/.github/workflows/ui-app-tests.yml
+++ b/.github/workflows/ui-app-tests.yml
@@ -1,9 +1,16 @@
name: UI App Tests
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
ui-app-tests:
name: UI App Tests
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
@@ -50,3 +57,16 @@ jobs:
with:
name: or-ui-app-test-results-${{ matrix.shardIndex }}
path: ui/app/*/app-test-report/**
+
+ ui-app-tests-status:
+ name: UI App Tests Status
+ needs: ui-app-tests
+ if: always()
+ runs-on: ubuntu-latest
+ steps:
+ - name: Check matrix job result
+ if: ${{ needs.ui-app-tests.result == 'failure' || needs.ui-app-tests.result == 'cancelled' }}
+ run: exit 1
+ - name: Success or Skipped
+ if: ${{ needs.ui-app-tests.result == 'success' || needs.ui-app-tests.result == 'skipped' }}
+ run: echo "UI App Tests completed successfully or were skipped."
diff --git a/.github/workflows/ui-check-dependencies.yml b/.github/workflows/ui-check-dependencies.yml
index 167b19581..539cefd03 100644
--- a/.github/workflows/ui-check-dependencies.yml
+++ b/.github/workflows/ui-check-dependencies.yml
@@ -1,9 +1,16 @@
name: UI Check Dependencies
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
ui-check-dependencies:
name: UI Check Dependencies
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/ui-check-outdated-translations.yml b/.github/workflows/ui-check-outdated-translations.yml
index 0fa1a10cf..76bff7ad1 100644
--- a/.github/workflows/ui-check-outdated-translations.yml
+++ b/.github/workflows/ui-check-outdated-translations.yml
@@ -1,9 +1,16 @@
name: UI Check Outdated Translations
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
ui-check-outdated-translations:
name: Check for outdated translations
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/ui-component-tests.yml b/.github/workflows/ui-component-tests.yml
index f30b9273e..a3aa9fa6f 100644
--- a/.github/workflows/ui-component-tests.yml
+++ b/.github/workflows/ui-component-tests.yml
@@ -1,9 +1,16 @@
name: UI Component Tests
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
ui-component-tests:
name: UI Component Tests
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index 05d975546..b6bb08fff 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -1,9 +1,16 @@
name: Unit Tests
-on: workflow_call
+on:
+ workflow_call:
+ inputs:
+ skip:
+ type: boolean
+ description: Skip condition to allow branch protection checks to pass
+ default: false
jobs:
unit-tests:
name: Unit Tests
+ if: ${{ !inputs.skip }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2