Add e2e test for DEX: order create, order make, list orders, cancel order #38
Workflow file for this run
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 | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_LOG: info | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: git config --global --add safe.directory "*" | |
- uses: dsherret/rust-toolchain-file@v1 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: fmt | |
run: cargo fmt --all -- --check | |
- name: clippy | |
run: cargo clippy --all-targets -- -D warnings -A clippy::vec-init-then-push | |
- name: Check if metadata is up-to-date | |
run: | | |
./fetch_metadata.sh | |
if ! git diff --exit-code; then | |
echo "Metadata is out of date. Please run ./fetch_metadata.sh and commit the changes." | |
exit 1 | |
fi | |
- name: Build | |
run: cargo build --release | |
- name: Run tests | |
run: cargo test --release |