Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: one workspace for all packages #181

Merged
merged 7 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,26 +81,22 @@ jobs:
aws --profile default configure set aws_secret_access_key "456"

- name: Build Chain-Signatures Contract
working-directory: ./chain-signatures
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Build eth contract
working-directory: ./chain-signatures/contract-eth
run: npm i && npx hardhat compile

- name: Build Chain-Signatures Node
working-directory: ./chain-signatures
run: cargo build -p mpc-node --release

# Build the tests before actually running them to see how long the tests take to run by itself
# instead of including the build time in the test time report on Github.
- name: Build Chain-Signatures Integration Tests
working-directory: ./integration-tests
run: cargo build --tests
run: cargo build -p integration-tests --tests

- name: Test
working-directory: ./integration-tests
run: cargo test --jobs 1 -- --test-threads 1
run: cargo test -p integration-tests --jobs 1 -- --test-threads 1
env:
RUST_LOG: info,workspaces=warn
RUST_BACKTRACE: 1
14 changes: 5 additions & 9 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
profile: minimal
toolchain: stable
target: wasm32-unknown-unknown

- name: Install Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -92,24 +92,20 @@ jobs:
aws --profile default configure set aws_secret_access_key "456"

- name: Build Chain-Signatures Contract
working-directory: ./chain-signatures
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release

- name: Build eth contract
working-directory: ./chain-signatures/contract-eth
run: npm i && npx hardhat compile

- name: Build Chain-Signatures Node
working-directory: ./chain-signatures
run: cargo build -p mpc-node --release

- name: Build Integration Tests
working-directory: ./integration-tests
run: cargo build --tests
- name: Build nightly
run: cargo build -p integration-tests --tests

- name: Run Nightly
working-directory: ./integration-tests
run: cargo test --package integration-tests --test lib -- cases::nightly --show-output --ignored
- name: Run nightly
run: cargo test -p integration-tests --test lib -- cases::nightly --show-output --ignored
env:
RUST_LOG: info,workspaces=warn
RUST_BACKTRACE: 1
14 changes: 4 additions & 10 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
key: "${{ runner.os }}-cargo-${{ hashFiles('mpc-recovery/Cargo.lock') }}"
restore-keys: ${{ runner.os }}-cargo-
- name: Compile Contract
run: cd chain-signatures && cargo build -p mpc-contract --target wasm32-unknown-unknown --release
run: cargo build -p mpc-contract --target wasm32-unknown-unknown --release
- name: Compile eth contract
run: cd chain-signatures/contract-eth && npm i && npx hardhat compile
- name: Eth contract unit tests
Expand All @@ -50,16 +50,11 @@ jobs:
( cd chain-signatures ; cargo check )
( cd integration-tests ; cargo check )
- name: Test format
run: |
( cd chain-signatures ; cargo fmt -- --check )
( cd integration-tests ; cargo fmt -- --check )
run: cargo fmt -- --check
- name: Test clippy
run: |
( cd chain-signatures ; cargo clippy --tests -- -Dclippy::all )
( cd integration-tests ; cargo clippy --tests -- -Dclippy::all )
run: cargo clippy --tests -- -Dclippy::all
- name: Unit tests
working-directory: chain-signatures
run: cargo test
run: cargo test --workspace --exclude integration-tests

audit:
name: Audit
Expand All @@ -76,7 +71,6 @@ jobs:
- name: Run Audit
# even if previous audit step fails, run this audit step to ensure all crates are audited
if: always()
working-directory: chain-signatures
# ALL audit exceptions must be justified here
# RUSTSEC-2024-0344 and RUSTSEC-2022-0093 are both to do with ed25519 signatures in near-sdk, we don't sign things with this library so it's safe
# RUSTSEC-2022-0054 wee-alloc is unmaintained, it's fine for now because we barely use an allocator and the contracts are short lived, but we should find a replacement/use the default allocator
Expand Down
4 changes: 0 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"rust-analyzer.linkedProjects": [
"chain-signatures/Cargo.toml",
"integration-tests/Cargo.toml",
],
"rust-analyzer.cargo.extraEnv": {
"CARGO_PROFILE_RUST_ANALYZER_INHERITS": "dev"
},
Expand Down
Loading
Loading