-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
49afdb1
commit 7a94940
Showing
3 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Initialize | ||
description: Common steps for initialization | ||
|
||
runs: | ||
using: composite | ||
|
||
steps: | ||
- name: Setup Rust | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Setup Fuelup | ||
shell: bash | ||
run: | | ||
curl https://install.fuel.network | sh | ||
echo "$HOME/.fuelup/bin:${GITHUB_PATH}" >> $GITHUB_PATH | ||
- name: Set default testnet toolchain | ||
shell: bash | ||
run: | | ||
fuelup update | ||
fuelup toolchain install testnet | ||
fuelup default testnet | ||
- name: Build the contracts | ||
shell: bash | ||
run: forc build | ||
|
||
- name: Cargo build | ||
shell: bash | ||
run: cargo build |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Check formatting | ||
|
||
on: | ||
- push | ||
- workflow_dispatch | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/initialize | ||
|
||
- name: Check sway formatting | ||
run: forc fmt --check | ||
|
||
- name: Check rust formatting | ||
run: cargo fmt --check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Run tests | ||
|
||
on: | ||
- push | ||
- workflow_dispatch | ||
|
||
jobs: | ||
tests: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout the repository | ||
uses: actions/checkout@v4 | ||
|
||
- uses: ./.github/actions/initialize | ||
|
||
- name: Run sway tests | ||
run: forc test | ||
|
||
- name: Run rust tests | ||
run: cargo test |