chore: add localhost to e2e testing #653
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 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 OPERATOR_KEY="302e020100300506032b65700422042091132178e72057a1d7528025956fe39b0b847f200ab59b2fdd367017f3087137" >> .env | |
echo OPERATOR_ID="0.0.2" >> .env | |
echo HEDERA_NETWORK="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 |