Exit db refactor #1416
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust tests | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Check Rita and Rita Exit x86 | |
run: cargo check --all | |
test: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Run Rita and Rita Exit tests | |
run: RUST_TEST_THREADS=1 cargo test --verbose --all | |
rustfmt: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Check code formatting | |
run: rustup component add rustfmt && cargo fmt --all -- --check | |
clippy: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Check for Clippy lints | |
run: rustup component add clippy && cargo clippy --all --all-targets --all-features -- -D warnings | |
audit: | |
needs: check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Run Cargo Audit | |
run: cargo install cargo-audit && cargo audit | |
cross-mips: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test mips | |
run: cargo install cross && cross test --target mips-unknown-linux-musl --verbose -- --test-threads=1 | |
cross-mipsel: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test mipsel | |
run: cargo install cross && cross test --target mipsel-unknown-linux-musl --verbose -- --test-threads=1 | |
cross-mips64: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test mips64 | |
run: cargo install cross && cross test --target mips64-unknown-linux-gnuabi64 --verbose -- --test-threads=1 | |
cross-mips64el: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test mips64el | |
run: cargo install cross && cross test --target mips64el-unknown-linux-gnuabi64 --verbose -- --test-threads=1 | |
cross-aarch64: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test aarch64 | |
run: cargo install cross && cross test --target aarch64-unknown-linux-musl --verbose -- --test-threads=1 | |
cross-armv7: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: Swatinem/rust-cache@v1 | |
- name: Cross test armv7 | |
run: cargo install cross && cross test --target armv7-unknown-linux-musleabihf --verbose -- --test-threads=1 | |
legacy_integration-test-with-backcompat: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/legacy_integration_test/test-ci-backcompat.sh | |
legacy_integration-test: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/legacy_integration_test/test-ci.sh | |
integration-test-five-nodes: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prune cache to keep the size down | |
run: docker builder prune -af && docker system prune -af | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/integration_tests/all-up-test.sh FIVE_NODES | |
integration-test-althea-payment: | |
needs: integration-test-five-nodes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/integration_tests/all-up-test.sh PAYMENTS_ALTHEA | |
integration-test-debts: | |
needs: integration-test-five-nodes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/integration_tests/all-up-test.sh DEBTS_TEST | |
integration-test-eth-payments: | |
needs: integration-test-five-nodes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/integration_tests/all-up-test.sh ETH_PAYMENTS | |
integration-test-multi-exit: | |
needs: integration-test-five-nodes | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Wireguard | |
run: sudo apt-get update && sudo apt install -y wireguard linux-source linux-headers-$(uname -r) build-essential && sudo modprobe wireguard | |
- name: Run integration test | |
run: bash scripts/integration_tests/all-up-test.sh MULTI_EXIT |