serai/.github/workflows/tests.yml
Luke Parker 18a1d15f78
Use composite actions in CI (#65)
* Attempt composite actions in CI

* Remove needs monero-daemon for the action

* Correct actions folder layout

* Remove empty inputs/outputs, add shell

* Try moving env declaration spot

* Remove usage of env

* Cached Rust composite action

* Replace [] with ""

Remove empty outputs
2022-07-23 06:05:31 -05:00

68 lines
1.5 KiB
YAML

name: Tests
on:
push:
branches:
- develop
pull_request:
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: "recursive"
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
- name: Install Rust
uses: ./.github/actions/cached-rust
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"
- name: Build Dependencies
uses: ./.github/actions/build-dependencies
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Monero Regtest Daemon
uses: ./.github/actions/monero
- name: Install Rust
uses: ./.github/actions/cached-rust
- name: Run tests
run: cargo test --all-features
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Doesn't grab the cache because it doesn't need it
- name: Install rustfmt
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: rustfmt
- name: Run rustfmt
run: cargo +nightly fmt -- --check