diff --git a/.github/workflows/ci_verify_clean_supported_message.yml b/.github/workflows/ci_verify_clean_supported_message.yml new file mode 100644 index 000000000..57befde8b --- /dev/null +++ b/.github/workflows/ci_verify_clean_supported_message.yml @@ -0,0 +1,19 @@ +name: CI verify cleanly generated supported message +'on': + workflow_call: null +jobs: + supported_message: + runs-on: ubuntu-latest + steps: + - name: Checkout (GitHub) + uses: actions/checkout@v4 + - name: Install dependencies + run: npm install + working-directory: tools/schema/ + - name: Regenerate supported message + run: node gen_supported_message + working-directory: tools/schema/ + - name: Format generated code + run: rustfmt lib/src/core/supported_message.rs + - name: Verify generated code matches committed code + run: git status --porcelain diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c03b24759..8c93f70a9 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,5 +37,8 @@ jobs: code-coverage: uses: ./.github/workflows/ci_code_coverage.yml + verify-clean-supported-message: + uses: ./.github/workflows/ci_verify_clean_supported_message.yml + verify-code-formatting: uses: ./.github/workflows/ci_format_code.yml diff --git a/rustfmt.toml b/rustfmt.toml index 2834f633a..9dd9e7ab0 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -1,5 +1,4 @@ ignore = [ - "core/src/supported_messsages.rs", "server/src/address_space/generated", "types/src/node_ids.rs", "types/src/service_types", diff --git a/tools/schema/gen_supported_message.js b/tools/schema/gen_supported_message.js index c357ade38..ba5dea1d4 100644 --- a/tools/schema/gen_supported_message.js +++ b/tools/schema/gen_supported_message.js @@ -28,7 +28,7 @@ use crate::types::{ service_types::*, }; -pub use crate::server::comms::tcp_types::AcknowledgeMessage; +pub use crate::core::comms::tcp_types::AcknowledgeMessage; /// This macro helps avoid tedious repetition as new messages are added /// The first form just handles the trailing comma after the last entry to save some pointless