2022-10-08 09:57:53 +00:00
|
|
|
name: BuildAndTest
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
2023-07-20 16:15:04 +00:00
|
|
|
branches: [ "dev" ]
|
2022-10-08 09:57:53 +00:00
|
|
|
|
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: ⚡ Cache
|
2022-12-20 21:27:21 +00:00
|
|
|
uses: actions/cache@v3
|
2022-10-08 09:57:53 +00:00
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/registry
|
|
|
|
~/.cargo/git
|
|
|
|
target
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
|
2023-08-07 16:23:05 +00:00
|
|
|
|
2023-08-07 16:19:02 +00:00
|
|
|
- name: Install Foundry
|
|
|
|
uses: foundry-rs/foundry-toolchain@v1
|
2023-08-07 16:23:05 +00:00
|
|
|
|
2023-03-28 17:10:58 +00:00
|
|
|
- name: Format
|
|
|
|
run: cargo fmt --check --verbose
|
|
|
|
- name: Lint
|
|
|
|
run: cargo clippy --all --all-features -- -D warnings
|
2023-08-07 16:23:05 +00:00
|
|
|
|
2022-10-08 09:57:53 +00:00
|
|
|
- name: Build
|
|
|
|
run: cargo build --verbose
|
2023-08-07 16:23:05 +00:00
|
|
|
|
2023-01-05 19:00:05 +00:00
|
|
|
- name: Download safes
|
|
|
|
run: wget -q -c https://rpc.circlesubi.id/pathfinder-db/capacity_graph.db
|
2023-08-07 16:23:05 +00:00
|
|
|
|
2022-10-08 09:57:53 +00:00
|
|
|
- name: Run tests
|
|
|
|
run: cargo test --verbose
|