Skip to content

Commit

Permalink
ci: Regenerate and verify the status codes file
Browse files Browse the repository at this point in the history
in order to enforce congruence between it and its source csv.

Furthermore drop the generated file from rustfmt ignore
as it's apparently currently formatted.
  • Loading branch information
AiyionPrime committed Jun 25, 2024
1 parent b6648bb commit 53f4a06
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
16 changes: 16 additions & 0 deletions .github/workflows/ci_verify_clean_status_codes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI verify cleanly generated status codes
'on':
workflow_call: null
jobs:
status_codes:
runs-on: ubuntu-latest
steps:
- name: Checkout (GitHub)
uses: actions/checkout@v4
- name: Regenerate status codes
run: node gen_status_codes
working-directory: tools/schema/
- name: Format generated code
run: rustfmt lib/src/types/status_codes.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-status-codes:
uses: ./.github/workflows/ci_verify_clean_status_codes.yml
1 change: 0 additions & 1 deletion rustfmt.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ ignore = [
"server/src/address_space/generated",
"types/src/node_ids.rs",
"types/src/service_types",
"types/src/status_codes.rs",
]

0 comments on commit 53f4a06

Please sign in to comment.