Skip to content

Commit

Permalink
Merge pull request #4 from InjectiveLabs/f/test-tube
Browse files Browse the repository at this point in the history
feat: added test-tube tests
  • Loading branch information
maxrobot authored Oct 7, 2024
2 parents 5bae23a + 65872d2 commit 178d471
Show file tree
Hide file tree
Showing 29 changed files with 3,796 additions and 1,143 deletions.
File renamed without changes.
38 changes: 38 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml

on:
push:
pull_request:
types: [opened]

name: Test tube integration tests

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
target: wasm32-unknown-unknown
override: true
components: llvm-tools-preview

- name: Compile WASM contracts
uses: actions-rs/cargo@v1
with:
command: build
args: --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude testenv
env:
RUSTFLAGS: "-C link-arg=-s"

- name: Run Integration Tests
uses: actions-rs/cargo@v1
with:
command: test
59 changes: 0 additions & 59 deletions .github/workflows/rust.yaml

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Based on https://github.com/actions-rs/example/blob/master/.github/workflows/quickstart.yml

on:
push:
pull_request:
types: [opened]

name: Unit tests + lints

jobs:
test:
name: Test Suite
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
target: wasm32-unknown-unknown
override: true
components: llvm-tools-preview

- name: Compile WASM contracts
uses: actions-rs/cargo@v1
with:
command: build
args: --release --lib --target wasm32-unknown-unknown --locked --workspace --exclude testenv
env:
RUSTFLAGS: "-C link-arg=-s"

- name: Run Integration Tests
uses: actions-rs/cargo@v1
with:
command: test

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.78.0
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- name: Show Clippy version
run: cargo clippy --version

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --tests -- -D warnings
Loading

0 comments on commit 178d471

Please sign in to comment.