From 200fb00a85c94afad9c791cc29a018a573730542 Mon Sep 17 00:00:00 2001 From: Tasio Victoria Date: Mon, 27 Nov 2023 15:10:42 -0500 Subject: [PATCH] Update CI --- .changeset/config.json | 11 ------- .github/workflows/basic.yml | 64 ++++++++++--------------------------- 2 files changed, 16 insertions(+), 59 deletions(-) delete mode 100644 .changeset/config.json diff --git a/.changeset/config.json b/.changeset/config.json deleted file mode 100644 index ab848d1..0000000 --- a/.changeset/config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json", - "changelog": "@changesets/cli/changelog", - "commit": false, - "fixed": [], - "linked": [], - "access": "restricted", - "baseBranch": "main", - "updateInternalDependencies": "patch", - "ignore": [] -} diff --git a/.github/workflows/basic.yml b/.github/workflows/basic.yml index d51dd93..f0b04a4 100644 --- a/.github/workflows/basic.yml +++ b/.github/workflows/basic.yml @@ -11,49 +11,18 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: 1.68.2 - target: wasm32-unknown-unknown - override: true - - - name: Cache Cargo dependencies - uses: actions/cache@v2 - with: - path: | - ~/.cargo/registry - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - name: Compile WASM contract - uses: actions-rs/cargo@v1 + - name: Use Node.js + uses: actions/setup-node@v3 with: - command: wasm - - - name: Unit Tests - run: cargo unit-test - - - name: Install check_contract - run: cargo install --debug --version 1.0.0 --features iterator --example check_contract -- cosmwasm-vm - - lint: - name: Lint - runs-on: ubuntu-latest - steps: - - uses: extractions/setup-just@v1 - - - name: Checkout sources - uses: actions/checkout@v2 + node-version: '18.x' - name: Install stable toolchain uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: 1.68.2 + target: wasm32-unknown-unknown override: true - components: rustfmt, clippy - name: Cache Cargo dependencies uses: actions/cache@v2 @@ -63,20 +32,10 @@ jobs: target key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - name: Run cargo doc - uses: actions-rs/cargo@v1 - with: - command: doc - args: -F library --no-deps - - - name: Run cargo clippy - run: just lint - - - name: Generate Schema - run: just schema + - name: Run codegen + run: npm run codegen - - name: Schema Changes - # fails if any changes not committed + - name: Check schema changes run: | CHANGES_IN_REPO=$(git status --porcelain) if [[ -n "$CHANGES_IN_REPO" ]]; then @@ -85,6 +44,15 @@ jobs: exit 1 fi + - name: Run lint + run: npm run lint + + - name: Run build + run: npm run build + + - name: Run unit-tests + run: npm run test:unit + coverage: name: Coverage runs-on: ubuntu-latest