2022-07-22 16:31:29 +00:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- develop
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: "recursive"
|
|
|
|
|
2022-07-23 11:05:31 +00:00
|
|
|
- name: Build Dependencies
|
|
|
|
uses: ./.github/actions/build-dependencies
|
2022-07-22 16:31:29 +00:00
|
|
|
|
|
|
|
- name: Install Rust
|
2022-07-23 11:05:31 +00:00
|
|
|
uses: ./.github/actions/cached-rust
|
2022-07-22 16:31:29 +00:00
|
|
|
with:
|
|
|
|
# Clippy requires nightly for some reason
|
|
|
|
toolchain: nightly
|
|
|
|
components: clippy
|
|
|
|
|
|
|
|
- name: Run Clippy
|
|
|
|
run: cargo clippy --all-features -- -D warnings -A clippy::type_complexity -A dead_code
|
|
|
|
|
|
|
|
test:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: "recursive"
|
|
|
|
|
2022-07-23 11:05:31 +00:00
|
|
|
- name: Build Dependencies
|
|
|
|
uses: ./.github/actions/build-dependencies
|
2022-07-22 16:31:29 +00:00
|
|
|
|
|
|
|
- name: Install Foundry
|
|
|
|
uses: foundry-rs/foundry-toolchain@v1
|
|
|
|
with:
|
|
|
|
version: nightly
|
|
|
|
|
2022-07-23 08:35:32 +00:00
|
|
|
- name: Monero Regtest Daemon
|
2022-07-23 11:05:31 +00:00
|
|
|
uses: ./.github/actions/monero
|
2022-07-22 16:31:29 +00:00
|
|
|
|
|
|
|
- name: Install Rust
|
2022-07-23 11:05:31 +00:00
|
|
|
uses: ./.github/actions/cached-rust
|
2022-07-22 16:31:29 +00:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --all-features
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
2022-07-23 11:05:31 +00:00
|
|
|
# Doesn't grab the cache because it doesn't need it
|
2022-07-22 16:31:29 +00:00
|
|
|
- name: Install rustfmt
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
toolchain: nightly
|
|
|
|
profile: minimal
|
|
|
|
components: rustfmt
|
|
|
|
|
|
|
|
- name: Run rustfmt
|
|
|
|
run: cargo +nightly fmt -- --check
|