Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add integration tests to CI #21

Merged
merged 2 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Integration tests
on:
push:
branches:
- main
pull_request:
env:
RUSTFLAGS: -D warnings
jobs:
test:
runs-on: ubuntu-latest
name: Test
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- name: Build docker image
run: docker build . -t near/mpc-recovery
- name: Test
run: cargo test -p mpc-recovery-integration-tests
19 changes: 9 additions & 10 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Unit tests
on:
push:
branches:
Expand All @@ -12,37 +12,36 @@ jobs:
name: Test
steps:
- uses: actions/checkout@v3
- name: "stable with rustfmt, and wasm32"
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: Swatinem/rust-cache@v1
- run: rustup target add wasm32-unknown-unknown
- name: Test
- name: Unit tests
run: cargo test -p mpc-recovery
lint:
name: Clippy and fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install stable toolchain
- name: Install stable toolchain with rustfmt and clippy
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1
- name: Test Format
- name: Test format
run: cargo fmt -- --check
- run: cargo clippy --tests -- -Dclippy::all
- name: Test clippy
run: cargo clippy --tests -- -Dclippy::all
audit:
name: Audit
runs-on: ubuntu-latest
steps:
- name: Checkout Sources
uses: actions/checkout@v3
- name: Install Toolchain
- uses: actions/checkout@v3
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down