diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7959e3cd..d67cf536 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -30,12 +30,25 @@ jobs: key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Install Rust - run: rustup update stable + run: rustup update 1.72 - - name: Install target - run: rustup target add wasm32-unknown-unknown + - name: Install rename + run: sudo apt-get install -y rename + + - name: Install rust deps + run: make install - - run: cargo test --workspace --exclude hpl-tests + - name: Run tests + run: cargo test --workspace --exclude hpl-tests + + - name: Build wasm + run: make ci-build + + - name: Upload wasm archive + uses: actions/upload-artifact@v2 + with: + name: wasm_codes + path: wasm_codes.zip coverage: runs-on: ubuntu-latest @@ -54,7 +67,7 @@ jobs: uses: taiki-e/install-action@cargo-llvm-cov - name: Generate code coverage - run: cargo llvm-cov --all-features --workspace --exclude hpl-tests --codecov --output-path codecov.json + run: cargo +nightly llvm-cov --all-features --workspace --exclude hpl-tests --codecov --output-path codecov.json - name: Upload to codecov.io uses: codecov/codecov-action@v3 diff --git a/Makefile b/Makefile index fa2176ef..a7b1cf3e 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,22 @@ - clean: @cargo clean @rm -rf ./artifacts +install: + cargo install --force cw-optimizoor cosmwasm-check beaker + rustup target add wasm32-unknown-unknown + schema: ls ./contracts | xargs -n 1 -t beaker wasm ts-gen build: + cargo build cargo wasm - -build-dev: clean cargo cw-optimizoor + rename --force 's/(.*)-(.*)\.wasm/$$1\.wasm/d' artifacts/* -check: build-dev +check: build ls -d ./artifacts/*.wasm | xargs -I x cosmwasm-check x + +ci-build: check + zip -jr wasm_codes.zip artifacts