Skip to content

Commit

Permalink
Merge pull request #512 from CosmWasm/494-cw1-whitelist-ng-ci
Browse files Browse the repository at this point in the history
Added cw1-whitelist-ng to CI
  • Loading branch information
hashedone authored Oct 26, 2021
2 parents 2240b6c + cc65119 commit bc7acc2
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 52 deletions.
37 changes: 37 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ workflows:
jobs:
- contract_cw1_subkeys
- contract_cw1_whitelist
- contract_cw1_whitelist_ng
- contract_cw3_fixed_multisig
- contract_cw3_flex_multisig
- contract_cw4_group
Expand Down Expand Up @@ -111,6 +112,42 @@ jobs:
- target
key: cargocache-cw1-whitelist-rust:1.53.0-{{ checksum "~/project/Cargo.lock" }}

contract_cw1_whitelist_ng:
docker:
- image: rust:1.53.0
working_directory: ~/project/contracts/cw1-whitelist-ng
steps:
- checkout:
path: ~/project
- run:
name: Version information
command: rustc --version; cargo --version; rustup --version
- restore_cache:
keys:
- cargocache-cw1-whitelist-ng-rust:1.53.0-{{ checksum "~/project/Cargo.lock" }}
- run:
name: Unit Tests
environment:
RUST_BACKTRACE: 1
command: cargo unit-test --locked
- run:
name: Build and run schema generator
command: cargo schema --locked
- run:
name: Ensure checked-in schemas are up-to-date
command: |
CHANGES_IN_REPO=$(git status --porcelain)
if [[ -n "$CHANGES_IN_REPO" ]]; then
echo "Repository is dirty. Showing 'git status' and 'git --no-pager diff' for debugging now:"
git status && git --no-pager diff
exit 1
fi
- save_cache:
paths:
- /usr/local/cargo/registry
- target
key: cargocache-cw1-whitelist-ng-rust:1.53.0-{{ checksum "~/project/Cargo.lock" }}

contract_cw20_atomic_swap:
docker:
- image: rust:1.53.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "ExecuteMsg",
"title": "Cw1ExecMsg",
"anyOf": [
{
"description": "Execute requests the contract to re-dispatch all these messages with the contract's address as sender. Every implementation has it's own logic to determine in",
Expand All @@ -25,43 +25,6 @@
}
},
"additionalProperties": false
},
{
"description": "Freeze will make a mutable contract immutable, must be called by an admin",
"type": "object",
"required": [
"freeze"
],
"properties": {
"freeze": {
"type": "object"
}
},
"additionalProperties": false
},
{
"description": "UpdateAdmins will change the admin set of the contract, must be called by an existing admin, and only works if the contract is mutable",
"type": "object",
"required": [
"update_admins"
],
"properties": {
"update_admins": {
"type": "object",
"required": [
"admins"
],
"properties": {
"admins": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
}
],
"definitions": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "QueryMsg",
"title": "Cw1QueryMsg",
"anyOf": [
{
"description": "Shows all admins and whether or not it is mutable",
"type": "object",
"required": [
"admin_list"
],
"properties": {
"admin_list": {
"type": "object"
}
},
"additionalProperties": false
},
{
"description": "Checks permissions of the caller on this proxy. If CanExecute returns true then a call to `Execute` with the same message, before any further state changes, should also succeed.",
"type": "object",
Expand Down
43 changes: 43 additions & 0 deletions contracts/cw1-whitelist-ng/schema/whitelist_exec_msg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WhitelistExecMsg",
"anyOf": [
{
"description": "Freeze will make a mutable contract immutable, must be called by an admin",
"type": "object",
"required": [
"freeze"
],
"properties": {
"freeze": {
"type": "object"
}
},
"additionalProperties": false
},
{
"description": "UpdateAdmins will change the admin set of the contract, must be called by an existing admin, and only works if the contract is mutable",
"type": "object",
"required": [
"update_admins"
],
"properties": {
"update_admins": {
"type": "object",
"required": [
"admins"
],
"properties": {
"admins": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"additionalProperties": false
}
]
}
19 changes: 19 additions & 0 deletions contracts/cw1-whitelist-ng/schema/whitelist_query_msg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WhitelistQueryMsg",
"anyOf": [
{
"description": "Shows all admins and whether or not it is mutable",
"type": "object",
"required": [
"admin_list"
],
"properties": {
"admin_list": {
"type": "object"
}
},
"additionalProperties": false
}
]
}

0 comments on commit bc7acc2

Please sign in to comment.