1
- name : Message Buffer IDL Check
1
+ name : Message Buffer Check
2
2
on :
3
3
pull_request :
4
4
paths :
8
8
- main
9
9
jobs :
10
10
abi-check :
11
- name : Check Message Buffer IDL files are up to date
11
+ name : Check Message Buffer formatting & IDL files
12
12
runs-on : ubuntu-latest
13
13
defaults :
14
14
run :
33
33
- name : Install Anchor
34
34
run : |
35
35
cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked
36
- - name : Build and generate IDLs
37
- run : anchor build
38
- - name : Copy anchor target files
39
- run : cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
40
36
# Libusb is a build requirement for the node-hid package and so pnpm
41
37
# install will fail if this isn't in the build environment and if a
42
38
# precompiled binary isn't found.
@@ -46,10 +42,21 @@ jobs:
46
42
name : Install pnpm
47
43
- name : Install prettier globally
48
44
run :
pnpm install -g [email protected]
45
+ - name : Build and generate IDLs
46
+ run : anchor build
47
+ - name : Copy anchor target files
48
+ run : cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/
49
49
- name : Run prettier (to avoid pre-commit failures)
50
50
run : |
51
51
pnpm dlx [email protected] --write "./idl/*"
52
52
- name : Check IDL changes
53
53
# Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for
54
54
# the current version of the contract and update idl directory.
55
55
run : git diff --exit-code idl/*
56
+ if : success() || failure()
57
+ - name : Cargo format
58
+ run : cargo fmt --all -- --check
59
+ if : success() || failure()
60
+ - name : Cargo clippy
61
+ run : cargo clippy --tests -- --deny warnings
62
+ if : success() || failure()
0 commit comments