Dashboard #33
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: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
name: Check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libudev-dev pkg-config | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt, clippy | |
- name: Install cargo-near | |
run: cargo install cargo-near@0.13.2 | |
- name: Check formatting | |
run: cargo fmt --all -- --check | |
- name: Build NEAR contracts | |
run: | | |
cd crates/oracle-contract && cargo near build non-reproducible-wasm | |
cd ../reclaim-gpt-contract && cargo near build non-reproducible-wasm | |
cd ../example-consumer && cargo near build non-reproducible-wasm | |
- name: Check with clippy | |
run: cargo clippy --all-targets --all-features -- -D warnings | |
- name: Build all crates | |
run: cargo build --all-features | |
- name: Run tests | |
run: cargo test --all |