From 4f62ed18152051df91c98d835fb71c8e15ebfc3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:05:32 +0300 Subject: [PATCH 1/6] ci(json-schema-check): run only if relevant files are changed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .github/workflows/json-schema-check.yaml | 26 ++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/json-schema-check.yaml b/.github/workflows/json-schema-check.yaml index 1654ce71e4a29..3ee31f0f9e613 100644 --- a/.github/workflows/json-schema-check.yaml +++ b/.github/workflows/json-schema-check.yaml @@ -5,7 +5,25 @@ on: workflow_dispatch: jobs: + pre-check: + runs-on: ubuntu-latest + outputs: + run-check: ${{ steps.set-run-check.outputs.run }} + steps: + - uses: actions/checkout@v3 + - uses: dorny/paths-filter@v3 + id: paths_filter + with: + filters: | + json_or_yaml: + - '**/schema/*.schema.json' + - '**/config/*.param.yaml' + - id: set-run-check + run: echo "::set-output name=run::${{ steps.paths_filter.outputs.json_or_yaml == 'true' }}" + json-schema-check: + needs: pre-check + if: needs.pre-check.outputs.run-check == 'true' runs-on: ubuntu-latest steps: - name: Check out repository @@ -13,3 +31,11 @@ jobs: - name: Run json-schema-check uses: autowarefoundation/autoware-github-actions/json-schema-check@v1 + + no-relevant-changes: + needs: pre-check + if: needs.pre-check.outputs.run-check == 'false' + runs-on: ubuntu-latest + steps: + - name: Dummy step + run: echo "No relevant changes, passing check" From ede71a8edb1668b7f1c6497f117dfd7df4c66c7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:26:10 +0300 Subject: [PATCH 2/6] simplify MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .github/workflows/json-schema-check.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/json-schema-check.yaml b/.github/workflows/json-schema-check.yaml index 3ee31f0f9e613..bbb01329e752c 100644 --- a/.github/workflows/json-schema-check.yaml +++ b/.github/workflows/json-schema-check.yaml @@ -8,7 +8,7 @@ jobs: pre-check: runs-on: ubuntu-latest outputs: - run-check: ${{ steps.set-run-check.outputs.run }} + run-check: ${{ steps.paths_filter.outputs.json_or_yaml }} steps: - uses: actions/checkout@v3 - uses: dorny/paths-filter@v3 @@ -18,8 +18,6 @@ jobs: json_or_yaml: - '**/schema/*.schema.json' - '**/config/*.param.yaml' - - id: set-run-check - run: echo "::set-output name=run::${{ steps.paths_filter.outputs.json_or_yaml == 'true' }}" json-schema-check: needs: pre-check From c091d5a3a11420a971573d1494217b6c59067f66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:34:33 +0300 Subject: [PATCH 3/6] temp change to break things to test the action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- localization/ekf_localizer/schema/ekf_localizer.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/ekf_localizer/schema/ekf_localizer.schema.json b/localization/ekf_localizer/schema/ekf_localizer.schema.json index 61fbcc2973aae..d329b41191421 100644 --- a/localization/ekf_localizer/schema/ekf_localizer.schema.json +++ b/localization/ekf_localizer/schema/ekf_localizer.schema.json @@ -38,7 +38,7 @@ "process_noise", "simple_1d_filter_parameters", "diagnostics", - "misc" + "misc-break things to test the action" ], "additionalProperties": false } From daf4bc19bc185ba14b89a6bb978df4c35a5fd7a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:38:15 +0300 Subject: [PATCH 4/6] temp change to test success of the action MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- localization/ekf_localizer/schema/ekf_localizer.schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/localization/ekf_localizer/schema/ekf_localizer.schema.json b/localization/ekf_localizer/schema/ekf_localizer.schema.json index d329b41191421..7cdb56651aafd 100644 --- a/localization/ekf_localizer/schema/ekf_localizer.schema.json +++ b/localization/ekf_localizer/schema/ekf_localizer.schema.json @@ -38,9 +38,9 @@ "process_noise", "simple_1d_filter_parameters", "diagnostics", - "misc-break things to test the action" + "misc" ], - "additionalProperties": false + "additionalProperties": true } }, "required": ["ros__parameters"], From d108e1beb7515b632e9be9a735488f8bada6e35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:43:00 +0300 Subject: [PATCH 5/6] revert temp changes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- localization/ekf_localizer/schema/ekf_localizer.schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localization/ekf_localizer/schema/ekf_localizer.schema.json b/localization/ekf_localizer/schema/ekf_localizer.schema.json index 7cdb56651aafd..61fbcc2973aae 100644 --- a/localization/ekf_localizer/schema/ekf_localizer.schema.json +++ b/localization/ekf_localizer/schema/ekf_localizer.schema.json @@ -40,7 +40,7 @@ "diagnostics", "misc" ], - "additionalProperties": true + "additionalProperties": false } }, "required": ["ros__parameters"], From e7d1b3e1bb69e3588adf37f7201c787f939ae410 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Fri, 1 Mar 2024 13:51:34 +0300 Subject: [PATCH 6/6] better naming MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- .github/workflows/json-schema-check.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/json-schema-check.yaml b/.github/workflows/json-schema-check.yaml index bbb01329e752c..77ce4576b4952 100644 --- a/.github/workflows/json-schema-check.yaml +++ b/.github/workflows/json-schema-check.yaml @@ -5,7 +5,7 @@ on: workflow_dispatch: jobs: - pre-check: + check-if-relevant-files-changed: runs-on: ubuntu-latest outputs: run-check: ${{ steps.paths_filter.outputs.json_or_yaml }} @@ -20,8 +20,8 @@ jobs: - '**/config/*.param.yaml' json-schema-check: - needs: pre-check - if: needs.pre-check.outputs.run-check == 'true' + needs: check-if-relevant-files-changed + if: needs.check-if-relevant-files-changed.outputs.run-check == 'true' runs-on: ubuntu-latest steps: - name: Check out repository @@ -31,8 +31,8 @@ jobs: uses: autowarefoundation/autoware-github-actions/json-schema-check@v1 no-relevant-changes: - needs: pre-check - if: needs.pre-check.outputs.run-check == 'false' + needs: check-if-relevant-files-changed + if: needs.check-if-relevant-files-changed.outputs.run-check == 'false' runs-on: ubuntu-latest steps: - name: Dummy step