File tree Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Expand file tree Collapse file tree 3 files changed +37
-10
lines changed Original file line number Diff line number Diff line change 66 },
77 "devDependencies" : {
88 "@size-limit/preset-app" : " ^7.0.8"
9- },
10- "size-limit" : [
11- {
12- "path" : " target/wasm32-unknown-unknown/release/cw_template.wasm" ,
13- "running" : false ,
14- "brotli" : false ,
15- "gzip" : false
16- }
17- ]
9+ }
1810}
Original file line number Diff line number Diff line change @@ -159,6 +159,7 @@ jobs:
159159
160160 report-wasm-size :
161161 runs-on : ubuntu-20.04
162+ if : github.event_name == 'pull_request'
162163 steps :
163164 - name : Check out repository
164165 uses : actions/checkout@v3
@@ -193,6 +194,36 @@ jobs:
193194 with :
194195 github_token : ${{ secrets.OKP4_TOKEN }}
195196
197+ check_contracts :
198+ runs-on : ubuntu-20.04
199+ steps :
200+ - name : Check out repository
201+ uses : actions/checkout@v3
202+
203+ - name : Cache cargo registry
204+ uses : actions/cache@v3
205+ with :
206+ path : |
207+ ~/.cargo/registry
208+ ~/.cargo/git
209+ ~/.cargo/bin
210+ key : ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
211+ restore-keys : |
212+ ${{ runner.os }}-cargo-
213+ - name : Setup rust
214+ uses : actions-rs/toolchain@v1
215+ with :
216+ toolchain : nightly
217+ default : true
218+ override : true
219+
220+ - name : Install cargo make
221+ uses : davidB/rust-cargo-make@v1
222+
223+ - name : Test rust code
224+ shell : bash
225+ run : cargo make check_contracts
226+
196227 lint-branch-name :
197228 runs-on : ubuntu-20.04
198229 if : github.actor != 'dependabot[bot]' && github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened')
Original file line number Diff line number Diff line change @@ -92,9 +92,13 @@ env = { RUSTFLAGS = "-C link-arg=-s" }
9292[tasks .check_contracts ]
9393dependencies = [" wasm" ]
9494script = '''
95- if [[ ! -f "$HOME/.cargo/bin/check_contract" ]]; then
95+ CHECK_CONTRACT_PATH=$HOME/.cargo/bin/check_contract
96+ echo "🧐 Check if check_contract is already installed in $CHECK_CONTRACT_PATH"
97+ if ! ls $CHECK_CONTRACT_PATH* 1> /dev/null 2>&1; then
9698 echo "🚚 Installing check_contract binary"
9799 cargo install --debug --version 1.0.0 --features iterator --force --example check_contract -- cosmwasm-vm
100+ else
101+ echo "✅ Using $(check_contract --version)"
98102fi
99103
100104for W in ./target/wasm32-unknown-unknown/release/*.wasm
You can’t perform that action at this time.
0 commit comments