Skip to content

Commit 1589951

Browse files
authored
feat: add forc-node command for easily bootstrapping a node (#6473)
1 parent 828e3c2 commit 1589951

File tree

24 files changed

+1860
-55
lines changed

24 files changed

+1860
-55
lines changed

.github/workflows/ci.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ jobs:
5151
- cargo-run-e2e-test-release
5252
- cargo-test-forc-debug
5353
- cargo-test-forc-client
54+
- cargo-test-forc-node
5455
- notify-slack-on-failure
5556
runs-on: ubuntu-latest
5657
steps:
@@ -239,6 +240,7 @@ jobs:
239240
cargo install --locked --debug --path ./forc-plugins/forc-doc
240241
cargo install --locked --debug --path ./forc-plugins/forc-tx
241242
cargo install --locked --debug --path ./forc-plugins/forc-crypto
243+
cargo install --locked --debug --path ./forc-plugins/forc-node
242244
cargo install --locked --debug --path ./forc-plugins/forc-migrate
243245
cargo install --locked --debug forc-explore
244246
- name: Install mdbook-forc-documenter
@@ -645,6 +647,27 @@ jobs:
645647
mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core
646648
- name: Run tests
647649
run: cargo test --locked --release -p forc-client -- --test-threads 1
650+
cargo-test-forc-node:
651+
runs-on: buildjet-4vcpu-ubuntu-2204
652+
needs: get-fuel-core-version
653+
steps:
654+
- uses: actions/checkout@v3
655+
- name: Install toolchain
656+
uses: dtolnay/rust-toolchain@master
657+
with:
658+
toolchain: ${{ env.RUST_VERSION }}
659+
targets: "x86_64-unknown-linux-gnu, wasm32-unknown-unknown"
660+
- uses: Swatinem/rust-cache@v2
661+
with:
662+
cache-provider: "buildjet"
663+
- name: Install fuel-core for tests
664+
run: |
665+
curl -sSLf https://github.com/FuelLabs/fuel-core/releases/download/v${{ needs.get-fuel-core-version.outputs.fuel_core_version }}/fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu.tar.gz -L -o fuel-core.tar.gz
666+
tar -xvf fuel-core.tar.gz
667+
chmod +x fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core
668+
mv fuel-core-${{ needs.get-fuel-core-version.outputs.fuel_core_version }}-x86_64-unknown-linux-gnu/fuel-core /usr/local/bin/fuel-core
669+
- name: Run tests
670+
run: cargo test --locked --release -p forc-node -- --test-threads 1
648671
cargo-test-sway-lsp:
649672
runs-on: buildjet-4vcpu-ubuntu-2204
650673
steps:
@@ -686,7 +709,7 @@ jobs:
686709
with:
687710
cache-provider: "buildjet"
688711
- name: Run tests
689-
run: cargo test --locked --release --workspace --exclude forc-debug --exclude sway-lsp --exclude forc-client --exclude forc
712+
run: cargo test --locked --release --workspace --exclude forc-debug --exclude sway-lsp --exclude forc-client --exclude forc --exclude forc-node
690713
cargo-unused-deps-check:
691714
runs-on: buildjet-4vcpu-ubuntu-2204
692715
steps:

0 commit comments

Comments
 (0)