Skip to content

Commit

Permalink
chore: update CI
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrobot committed Sep 24, 2024
1 parent 7372546 commit 7aefb9a
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 67 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/integration_tests.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# 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
args: --features integration
67 changes: 0 additions & 67 deletions .github/workflows/rust.yaml

This file was deleted.

60 changes: 60 additions & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# 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: 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

0 comments on commit 7aefb9a

Please sign in to comment.