Skip to content

Commit

Permalink
ci: Regenerate and verify the types files
Browse files Browse the repository at this point in the history
in order to enforce congruence between them and the schema.

Furthermore drop the generated files from rustfmt ignore
as they're apparently currently formatted.
  • Loading branch information
AiyionPrime committed Jun 27, 2024
1 parent ecff08a commit a3e9169
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .github/workflows/ci_verify_clean_types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: CI verify cleanly generated types
'on':
workflow_call: null
jobs:
types:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Install dependencies
run: npm install
working-directory: tools/schema/
- name: Regenerate types
run: node gen_types
working-directory: tools/schema/
- name: Format generated code
run: rustfmt lib/src/types/service_types/mod.rs
- name: Verify generated code matches committed code
run: git status --porcelain
3 changes: 3 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ jobs:
run: cargo build --features test-vendored-openssl
- name: Run tests
run: cargo test --features test-vendored-openssl --verbose

verify-clean-types:
uses: ./.github/workflows/ci_verify_clean_types.yml
1 change: 0 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,5 @@ ignore = [
"core/src/supported_messsages.rs",
"server/src/address_space/generated",
"types/src/node_ids.rs",
"types/src/service_types",
"types/src/status_codes.rs",
]

0 comments on commit a3e9169

Please sign in to comment.