Skip to content

Merge pull request #734 from hashgraph/rl-release-0-23 #1

Merge pull request #734 from hashgraph/rl-release-0-23

Merge pull request #734 from hashgraph/rl-release-0-23 #1

Workflow file for this run

name: Rust CI
on:
pull_request:
push:
branches: ['main']
jobs:
format:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Add `rustfmt` to toolchain
run: rustup +nightly component add rustfmt
- name: Format
run: cargo +nightly fmt --check
check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
sdk/rust
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Check
run: cargo check --workspace
test:
needs: ['check']
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Start the local node
run: npx @hashgraph/[email protected] start -d --network local
- name: "Create env file"
run: |
touch .env
echo TEST_OPERATOR_KEY="302e020100300506032b657004220420a608e2130a0a3cb34f86e757303c862bee353d9ab77ba4387ec084f881d420d4" >> .env
echo TEST_OPERATOR_ID="0.0.1022" >> .env
echo TEST_NETWORK_NAME="localhost" >> .env
echo TEST_RUN_NONFREE="1" >> .env
cat .env
- name: Test
run: cargo test --workspace
- name: Stop the local node
run: npx @hashgraph/[email protected] stop