Fix networking issues with swarm #556
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 | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Rust 1.81.0 | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.81.0 | |
override: true | |
# We must install foundry in order to be able to test anvil | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
- name: Install solc | |
run: | | |
sudo add-apt-repository ppa:ethereum/ethereum \ | |
&& sudo apt-get update -y \ | |
&& sudo apt-get install -y solc | |
# We need to setup node in order to compile the hardhat contracts to get the artifacts | |
- name: "Setup node" | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 20 | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
with: | |
path: "**/node_modules" | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }} | |
- name: "Install the dependencies" | |
run: "yarn install" | |
- name: "Compile the contracts and generate the TypeChain bindings" | |
run: "yarn typechain" | |
# Now we can check rust formatting and run tests | |
- name: Checking code format | |
run: cd ./packages/ciphernode && cargo fmt -- --check | |
- name: Run tests | |
run: "yarn ciphernode:test" |