Skip to content

Commit

Permalink
feat: add cyberpunk
Browse files Browse the repository at this point in the history
  • Loading branch information
loloicci committed Feb 28, 2024
1 parent 722b3e5 commit 2bdf523
Show file tree
Hide file tree
Showing 2 changed files with 380 additions and 318 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,52 @@ jobs:
working-directory: ${{env.root-directory}}/voting-with-uuid
run: cargo fmt -- --check

contract_cyberpunk:
name: contract_cyberpunk
runs-on: ubuntu-latest
env:
working-directory: ./contracts/cyberpunk
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.76.0
target: wasm32-unknown-unknown
profile: minimal
override: true
- name: Cache cargo
uses: actions/cache@v3
with:
path: ~/.cargo
key: cargocache-v2-contract_cyberpunk-rust:1.76.0-${{ hashFiles('contracts/cyberpunk/Cargo.lock') }}
- name: Version information
run: rustc --version; cargo --version; rustup --version; rustup target list --installed
- name: Add wasm32 target
run: rustup target add wasm32-unknown-unknown && rustup target list --installed
- name: Build wasm binary
working-directory: ${{env.working-directory}}
run: cargo wasm --locked
- name: Unit tests
working-directory: ${{env.working-directory}}
run: cargo unit-test --locked
- name: Integration tests (singlepass backend)
working-directory: ${{env.working-directory}}
run: cargo integration-test --locked --no-default-features
- name: Build and run schema generator
working-directory: ${{env.working-directory}}
run: cargo schema --locked
- name: Ensure schemas are up-to-date
working-directory: ${{env.working-directory}}
run: |
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
clippy:
name: clippy
runs-on: ubuntu-latest
Expand Down Expand Up @@ -843,3 +889,9 @@ jobs:
mkdir -p target/wasm32-unknown-unknown/release
touch target/wasm32-unknown-unknown/release/cw_voting_with_uuid.wasm
cargo clippy --tests -- -D warnings
- name: Clippy linting on cyberpunk
working-directory: ${{env.contracts}}/cyberpunk
run: |
mkdir -p target/wasm32-unknown-unknown/release
touch target/wasm32-unknown-unknown/release/cyberpunk.wasm
cargo clippy --tests -- -D warnings
Loading

0 comments on commit 2bdf523

Please sign in to comment.