[attestations] Add attestations to mvr frontend #492
This file contains hidden or 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"] | |
| paths: | |
| - crates/** | |
| - .github/workflows/rust-ci.yml | |
| - Cargo.lock | |
| - Cargo.toml | |
| pull_request: | |
| branches: ["main"] | |
| paths: | |
| - crates/** | |
| - .github/workflows/rust-ci.yml | |
| - Cargo.lock | |
| - Cargo.toml | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| jobs: | |
| test-crates: | |
| name: test-crates | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: taiki-e/install-action@cargo-nextest | |
| - name: Install postgres | |
| shell: bash | |
| run: | | |
| sudo apt update && sudo apt install postgresql | |
| - name: Add postgres to PATH | |
| run: echo "/usr/lib/postgresql/16/bin" >> $GITHUB_PATH | |
| - name: Run mvr-indexer tests | |
| run: | | |
| cargo nextest run -E 'package(mvr-indexer)' | |
| - name: Run mvr-api tests | |
| run: | | |
| cargo nextest run -E 'package(mvr-api)' | |
| build: | |
| runs-on: ubuntu-latest | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: rust version | |
| run: | | |
| rustc --version | |
| cargo --version | |
| - uses: taiki-e/install-action@cargo-nextest | |
| - name: Build mvr-cli (debug) | |
| run: | | |
| cargo build -p mvr | |
| echo "$(pwd)/target/debug" >> $GITHUB_PATH | |
| - name: Run mvr-cli tests | |
| run: | | |
| cd crates/mvr-cli | |
| cargo nextest run | |
| - name: Get Sui releases JSON file | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| shell: bash | |
| run: | | |
| curl \ | |
| -H "Accept: application/vnd.github+json" \ | |
| -H "Authorization: Bearer $GITHUB_TOKEN" \ | |
| -L -o releases.json \ | |
| https://api.github.com/repos/MystenLabs/sui/releases | |
| - name: Get the latest Sui testnet binary and add it to PATH | |
| shell: bash | |
| run: | | |
| os=${{runner.os}} | |
| binary_os="" | |
| if [ $os == "Linux" ]; then | |
| binary_os="ubuntu" | |
| fi | |
| testnet_url=$(cat releases.json | jq --arg os $binary_os '.[] | .assets[] | select(.name | contains("testnet")) | select(.name | contains($os)) | select(.name | contains("x86"))'| jq -csr '.[0] | .browser_download_url') | |
| filename="sui-$binary_os.tar.gz" | |
| echo "Downloading testnet binary from $testnet_url" | |
| wget -q $testnet_url -O $filename | |
| tar -zxvf $filename ./sui | |
| echo "$(pwd)" >> $GITHUB_PATH | |
| - name: Set up client.yaml for sui move build | |
| shell: bash | |
| run: | | |
| mkdir -p $HOME/.sui/sui_config | |
| tee $HOME/.sui/sui_config/client.yaml <<EOF | |
| --- | |
| keystore: | |
| File: home/.sui/sui_config/sui.keystore | |
| envs: | |
| - alias: localnet | |
| rpc: "http://127.0.0.1:9000" | |
| ws: ~ | |
| - alias: testnet | |
| rpc: "https://fullnode.testnet.sui.io" | |
| ws: ~ | |
| - alias: mainnet | |
| rpc: "https://fullnode.mainnet.sui.io" | |
| ws: ~ | |
| - alias: devnet | |
| rpc: "https://fullnode.devnet.sui.io" | |
| ws: ~ | |
| active_env: localnet | |
| active_address: "0x14e7ac25259adcc373c96627893976d4fe562a3f3fedce493fc187c5ebd53eee" | |
| EOF | |
| - name: Run mvr-cli integration tests | |
| run: | | |
| cargo nextest run -p ci_tests | |
| rustfmt: | |
| runs-on: [ ubuntu-latest ] | |
| steps: | |
| - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # Pin v4.1.1 | |
| - run: rustup component add rustfmt | |
| - run: cargo fmt --check |