From ffd03b55b01e5f304b551ddf2a4e5c9852789801 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 13:49:21 +0000 Subject: [PATCH 01/10] Add cargo fmt and cargo clippy to CI workflows Co-Authored-By: Jayant Krishnamurthy --- .github/workflows/ci-cosmwasm-contract.yml | 8 ++++++++ .github/workflows/ci-fortuna.yml | 7 +++++++ .github/workflows/ci-fuel-contract.yml | 10 ++++++++++ .github/workflows/ci-hermes-server.yml | 7 +++++++ .github/workflows/ci-lazer-rust.yml | 8 ++++++++ .github/workflows/ci-remote-executor.yml | 7 +++++++ .github/workflows/ci-solana-contract.yml | 9 +++++++++ 7 files changed, 56 insertions(+) diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index 9bcb9ee0ef..4888a60167 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -26,7 +26,15 @@ jobs: toolchain: 1.82.0 components: rustfmt, clippy override: true + - name: Format check + run: cargo +1.82.0 fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.82.0 clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Build run: cargo build --verbose + if: success() || failure() - name: Run tests run: cargo test --verbose + if: success() || failure() diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index 837c85d67f..6950489768 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -19,5 +19,12 @@ jobs: profile: minimal toolchain: 1.82.0 override: true + - name: Format check + run: cargo +1.82.0 fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.82.0 clippy --manifest-path ./apps/fortuna/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Run executor tests run: cargo test --manifest-path ./apps/fortuna/Cargo.toml + if: success() || failure() diff --git a/.github/workflows/ci-fuel-contract.yml b/.github/workflows/ci-fuel-contract.yml index 2b3015a419..b36c25c9b5 100644 --- a/.github/workflows/ci-fuel-contract.yml +++ b/.github/workflows/ci-fuel-contract.yml @@ -30,9 +30,19 @@ jobs: run: forc build --verbose - name: Run tests with Forc run: forc test --verbose + if: success() || failure() - name: Rust add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown + if: success() || failure() + - name: Format check + run: cargo fmt --manifest-path ./target_chains/fuel/contracts/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo clippy --manifest-path ./target_chains/fuel/contracts/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Build run: cargo build --verbose + if: success() || failure() - name: Run tests run: cargo test --verbose + if: success() || failure() diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index 0bde6e1f08..56853dd701 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -24,5 +24,12 @@ jobs: uses: arduino/setup-protoc@v3 with: repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Format check + run: cargo +1.82.0 fmt --manifest-path ./apps/hermes/server/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.82.0 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Run executor tests run: cargo test --manifest-path ./apps/hermes/server/Cargo.toml + if: success() || failure() diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index 6191d11e92..2bed46b82f 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -36,7 +36,15 @@ jobs: echo "$HOME/.local/share/solana/install/active_release/bin" >> "$GITHUB_PATH" - name: check Cargo.toml formatting run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; + - name: Format check + run: cargo +1.82.0 fmt --manifest-path ./lazer/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.82.0 clippy --manifest-path ./lazer/Cargo.toml --all-targets -- --deny warnings + if: success() || failure() - name: Build Solana programs run: cargo build-sbf + if: success() || failure() - name: test run: cargo test + if: success() || failure() diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index 1a1ffce1ff..f2e6e1aafe 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -25,5 +25,12 @@ jobs: run: | sh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + - name: Format check + run: cargo +1.73.0 fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.73.0 clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Run executor tests run: cargo test-sbf --manifest-path ./governance/remote_executor/Cargo.toml + if: success() || failure() diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index 451d98451e..7b8bc85912 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -32,9 +32,18 @@ jobs: run: | sh -c "$(curl -sSfL https://release.solana.com/v1.16.20/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH + - name: Format check + run: cargo +1.73.0 fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo +1.73.0 clippy --manifest-path ./target_chains/solana/Cargo.toml --tests -- --deny warnings + if: success() || failure() - name: Build run: cargo-build-sbf + if: success() || failure() - name: Run tests run: cargo-test-sbf + if: success() || failure() - name: Run sdk tests run: cargo test --package pyth-solana-receiver-sdk + if: success() || failure() From c5711dd357e6b22fa1cad7b6d1097ac6e56efb1d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 13:54:13 +0000 Subject: [PATCH 02/10] refactor: remove toolchain version arguments from cargo commands Co-Authored-By: Jayant Krishnamurthy --- .github/workflows/ci-cosmwasm-contract.yml | 4 ++-- .github/workflows/ci-fortuna.yml | 4 ++-- .github/workflows/ci-hermes-server.yml | 4 ++-- .github/workflows/ci-lazer-rust.yml | 4 ++-- .github/workflows/ci-remote-executor.yml | 4 ++-- .github/workflows/ci-solana-contract.yml | 4 ++-- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index 4888a60167..193a2a01cf 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -27,10 +27,10 @@ jobs: components: rustfmt, clippy override: true - name: Format check - run: cargo +1.82.0 fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.82.0 clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests -- --deny warnings + run: cargo clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests -- --deny warnings if: success() || failure() - name: Build run: cargo build --verbose diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index 6950489768..c78d4aa34d 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -20,10 +20,10 @@ jobs: toolchain: 1.82.0 override: true - name: Format check - run: cargo +1.82.0 fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.82.0 clippy --manifest-path ./apps/fortuna/Cargo.toml --tests -- --deny warnings + run: cargo clippy --manifest-path ./apps/fortuna/Cargo.toml --tests -- --deny warnings if: success() || failure() - name: Run executor tests run: cargo test --manifest-path ./apps/fortuna/Cargo.toml diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index 56853dd701..f53e41c3a6 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -25,10 +25,10 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Format check - run: cargo +1.82.0 fmt --manifest-path ./apps/hermes/server/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./apps/hermes/server/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.82.0 clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests -- --deny warnings + run: cargo clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests -- --deny warnings if: success() || failure() - name: Run executor tests run: cargo test --manifest-path ./apps/hermes/server/Cargo.toml diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index 2bed46b82f..11df744f0b 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -37,10 +37,10 @@ jobs: - name: check Cargo.toml formatting run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; - name: Format check - run: cargo +1.82.0 fmt --manifest-path ./lazer/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./lazer/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.82.0 clippy --manifest-path ./lazer/Cargo.toml --all-targets -- --deny warnings + run: cargo clippy --manifest-path ./lazer/Cargo.toml --all-targets -- --deny warnings if: success() || failure() - name: Build Solana programs run: cargo build-sbf diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index f2e6e1aafe..16a4f38cf0 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -26,10 +26,10 @@ jobs: sh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check - run: cargo +1.73.0 fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.73.0 clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests -- --deny warnings + run: cargo clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests -- --deny warnings if: success() || failure() - name: Run executor tests run: cargo test-sbf --manifest-path ./governance/remote_executor/Cargo.toml diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index 7b8bc85912..c00c03d5d5 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -33,10 +33,10 @@ jobs: sh -c "$(curl -sSfL https://release.solana.com/v1.16.20/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check - run: cargo +1.73.0 fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --check + run: cargo fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --check if: success() || failure() - name: Clippy check - run: cargo +1.73.0 clippy --manifest-path ./target_chains/solana/Cargo.toml --tests -- --deny warnings + run: cargo clippy --manifest-path ./target_chains/solana/Cargo.toml --tests -- --deny warnings if: success() || failure() - name: Build run: cargo-build-sbf From b56f9c4e73d899eb738859e4bd9408bc0d90ca92 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 07:24:28 -0700 Subject: [PATCH 03/10] update worfklows --- .github/workflows/ci-aptos-contract.yml | 9 +++++++ .github/workflows/ci-cosmwasm-contract.yml | 4 +-- .github/workflows/ci-fortuna.yml | 6 ++--- .github/workflows/ci-fuel-contract.yml | 10 ------- .github/workflows/ci-hermes-server.yml | 6 ++--- .github/workflows/ci-lazer-rust.yml | 4 +-- .github/workflows/ci-message-buffer-idl.yml | 19 ++++++++----- .github/workflows/ci-pythnet-sdk.yml | 30 +++++++++++++++++++++ .github/workflows/ci-remote-executor.yml | 9 ++++--- .github/workflows/ci-solana-contract.yml | 4 +-- 10 files changed, 70 insertions(+), 31 deletions(-) create mode 100644 .github/workflows/ci-pythnet-sdk.yml diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 33b74c8ee5..2eec2e2d60 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -24,5 +24,14 @@ jobs: - name: Unzip CLI run: unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip + - name: Check Formatting + run: ./aptos move fmt + if: success() || failure() + + - name: Lint + run: ./aptos move lint --check-test-code --dev + if: success() || failure() + - name: Run tests run: ./aptos move test + if: success() || failure() diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index 193a2a01cf..f20f1ca716 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -27,10 +27,10 @@ jobs: components: rustfmt, clippy override: true - name: Format check - run: cargo fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests -- --deny warnings + run: cargo clippy --tests -- --deny warnings if: success() || failure() - name: Build run: cargo build --verbose diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index c78d4aa34d..8a5e6bda6f 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -20,11 +20,11 @@ jobs: toolchain: 1.82.0 override: true - name: Format check - run: cargo fmt --manifest-path ./apps/fortuna/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./apps/fortuna/Cargo.toml --tests -- --deny warnings + run: cargo clippy --tests -- --deny warnings if: success() || failure() - name: Run executor tests - run: cargo test --manifest-path ./apps/fortuna/Cargo.toml + run: cargo test if: success() || failure() diff --git a/.github/workflows/ci-fuel-contract.yml b/.github/workflows/ci-fuel-contract.yml index b36c25c9b5..2b3015a419 100644 --- a/.github/workflows/ci-fuel-contract.yml +++ b/.github/workflows/ci-fuel-contract.yml @@ -30,19 +30,9 @@ jobs: run: forc build --verbose - name: Run tests with Forc run: forc test --verbose - if: success() || failure() - name: Rust add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown - if: success() || failure() - - name: Format check - run: cargo fmt --manifest-path ./target_chains/fuel/contracts/Cargo.toml --all -- --check - if: success() || failure() - - name: Clippy check - run: cargo clippy --manifest-path ./target_chains/fuel/contracts/Cargo.toml --tests -- --deny warnings - if: success() || failure() - name: Build run: cargo build --verbose - if: success() || failure() - name: Run tests run: cargo test --verbose - if: success() || failure() diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index f53e41c3a6..b6b40a0bac 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -25,11 +25,11 @@ jobs: with: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Format check - run: cargo fmt --manifest-path ./apps/hermes/server/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./apps/hermes/server/Cargo.toml --tests -- --deny warnings + run: cargo clippy --tests -- --deny warnings if: success() || failure() - name: Run executor tests - run: cargo test --manifest-path ./apps/hermes/server/Cargo.toml + run: cargo test if: success() || failure() diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index 11df744f0b..b5ef4951ac 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -37,10 +37,10 @@ jobs: - name: check Cargo.toml formatting run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; - name: Format check - run: cargo fmt --manifest-path ./lazer/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./lazer/Cargo.toml --all-targets -- --deny warnings + run: cargo clippy --all-targets -- --deny warnings if: success() || failure() - name: Build Solana programs run: cargo build-sbf diff --git a/.github/workflows/ci-message-buffer-idl.yml b/.github/workflows/ci-message-buffer-idl.yml index 79c3cf0fd3..20fe62a5c0 100644 --- a/.github/workflows/ci-message-buffer-idl.yml +++ b/.github/workflows/ci-message-buffer-idl.yml @@ -1,4 +1,4 @@ -name: Message Buffer IDL Check +name: Message Buffer Check on: pull_request: paths: @@ -8,7 +8,7 @@ on: - main jobs: abi-check: - name: Check Message Buffer IDL files are up to date + name: Check Message Buffer formatting & IDL files runs-on: ubuntu-latest defaults: run: @@ -33,10 +33,6 @@ jobs: - name: Install Anchor run: | cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked - - name: Build and generate IDLs - run: anchor build - - name: Copy anchor target files - run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/ # Libusb is a build requirement for the node-hid package and so pnpm # install will fail if this isn't in the build environment and if a # precompiled binary isn't found. @@ -46,6 +42,10 @@ jobs: name: Install pnpm - name: Install prettier globally run: pnpm install -g prettier@2.7.1 + - name: Build and generate IDLs + run: anchor build + - name: Copy anchor target files + run: cp ./target/idl/message_buffer.json idl/ && cp ./target/types/message_buffer.ts idl/ - name: Run prettier (to avoid pre-commit failures) run: | pnpm dlx prettier@2.7.1 --write "./idl/*" @@ -53,3 +53,10 @@ jobs: # Fails if the IDL files are not up to date. Please use anchor build to regenerate the IDL files for # the current version of the contract and update idl directory. run: git diff --exit-code idl/* + if: success() || failure() + - name: Cargo format + run: cargo fmt --all -- --check + if: success() || failure() + - name: Cargo clippy + run: cargo clippy --tests -- --deny warnings + if: success() || failure() diff --git a/.github/workflows/ci-pythnet-sdk.yml b/.github/workflows/ci-pythnet-sdk.yml new file mode 100644 index 0000000000..06810f3d11 --- /dev/null +++ b/.github/workflows/ci-pythnet-sdk.yml @@ -0,0 +1,30 @@ +name: Check Pythnet SDK + +on: + pull_request: + paths: + - pythnet/pythnet_sdk/** + push: + branches: [main] +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "pythnet/pythnet_sdk -> target" + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: 1.82.0 + override: true + - name: Format check + run: cargo fmt --all -- --check + if: success() || failure() + - name: Clippy check + run: cargo clippy --tests -- --deny warnings + if: success() || failure() + - name: Run executor tests + run: cargo test + if: success() || failure() diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index 16a4f38cf0..c74e8ea73b 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -9,6 +9,9 @@ on: jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: governance/remote_executor steps: - uses: actions/checkout@v2 - uses: actions/setup-python@v2 @@ -26,11 +29,11 @@ jobs: sh -c "$(curl -sSfL https://release.solana.com/v1.18.23/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check - run: cargo fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests -- --deny warnings + run: cargo clippy --tests -- --deny warnings if: success() || failure() - name: Run executor tests - run: cargo test-sbf --manifest-path ./governance/remote_executor/Cargo.toml + run: cargo test-sbf if: success() || failure() diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index c00c03d5d5..8e7db83646 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -33,10 +33,10 @@ jobs: sh -c "$(curl -sSfL https://release.solana.com/v1.16.20/install)" echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check - run: cargo fmt --manifest-path ./target_chains/solana/Cargo.toml --all -- --check + run: cargo fmt --all -- --check if: success() || failure() - name: Clippy check - run: cargo clippy --manifest-path ./target_chains/solana/Cargo.toml --tests -- --deny warnings + run: cargo clippy --tests -- --deny warnings if: success() || failure() - name: Build run: cargo-build-sbf From 0aaf2d3ec963d37ceb469c0b4b346796fdd6d03c Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 07:46:02 -0700 Subject: [PATCH 04/10] trigger workflows on edit --- .github/workflows/ci-aptos-contract.yml | 1 + .github/workflows/ci-cosmwasm-contract.yml | 1 + .github/workflows/ci-fortuna.yml | 1 + .github/workflows/ci-hermes-server.yml | 1 + .github/workflows/ci-lazer-rust.yml | 1 + .../{ci-message-buffer-idl.yml => ci-message-buffer.yml} | 1 + .github/workflows/ci-pythnet-sdk.yml | 1 + .github/workflows/ci-remote-executor.yml | 1 + .github/workflows/ci-solana-contract.yml | 1 + 9 files changed, 9 insertions(+) rename .github/workflows/{ci-message-buffer-idl.yml => ci-message-buffer.yml} (98%) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 2eec2e2d60..5387a5c1c3 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -1,6 +1,7 @@ on: pull_request: paths: + - .github/workflows/ci-aptos-contract.yml - target_chains/aptos/contracts/** push: branches: diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index f20f1ca716..cdac37b467 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -3,6 +3,7 @@ name: Test CosmWasm Contract on: pull_request: paths: + - .github/workflows/ci-cosmwasm-contract.yml - target_chains/cosmwasm/** - wormhole_attester/sdk/rust/** push: diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index 8a5e6bda6f..96dd1e68c9 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -3,6 +3,7 @@ name: Check Fortuna on: pull_request: paths: + - .github/workflows/ci-fortuna.yml - apps/fortuna/** push: branches: [main] diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index b6b40a0bac..a4cb1f3283 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -3,6 +3,7 @@ name: Check Hermes Server on: pull_request: paths: + - .github/workflows/ci-hermes-server.yml - apps/hermes/server/** push: branches: [main] diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index b5ef4951ac..f744f8e582 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -5,6 +5,7 @@ on: - main pull_request: paths: + - .github/workflows/ci-lazer-rust.yml - lazer/** jobs: diff --git a/.github/workflows/ci-message-buffer-idl.yml b/.github/workflows/ci-message-buffer.yml similarity index 98% rename from .github/workflows/ci-message-buffer-idl.yml rename to .github/workflows/ci-message-buffer.yml index 20fe62a5c0..49733892c3 100644 --- a/.github/workflows/ci-message-buffer-idl.yml +++ b/.github/workflows/ci-message-buffer.yml @@ -2,6 +2,7 @@ name: Message Buffer Check on: pull_request: paths: + - .github/workflows/ci-message-buffer.yml - pythnet/message_buffer/** push: branches: diff --git a/.github/workflows/ci-pythnet-sdk.yml b/.github/workflows/ci-pythnet-sdk.yml index 06810f3d11..09a439ae83 100644 --- a/.github/workflows/ci-pythnet-sdk.yml +++ b/.github/workflows/ci-pythnet-sdk.yml @@ -3,6 +3,7 @@ name: Check Pythnet SDK on: pull_request: paths: + - .github/workflows/ci-pythnet-sdk.yml - pythnet/pythnet_sdk/** push: branches: [main] diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index c74e8ea73b..170ba01e73 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -3,6 +3,7 @@ name: Check Remote Executor on: pull_request: paths: + - .github/workflows/ci-remote-executor.yml - governance/remote_executor/** push: branches: [main] diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index 8e7db83646..b6d1c905bb 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -3,6 +3,7 @@ name: Test Solana Contract on: pull_request: paths: + - .github/workflows/ci-solana-contract.yml - target_chains/solana/** - pythnet/pythnet_sdk/** push: From fd23f9c15658114e533de1a2b55b4c2339b76be5 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 07:58:51 -0700 Subject: [PATCH 05/10] fix workflows --- .github/workflows/ci-aptos-contract.yml | 2 +- .github/workflows/ci-fortuna.yml | 5 ++++- .github/workflows/ci-hermes-server.yml | 3 +++ .github/workflows/ci-pythnet-sdk.yml | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 5387a5c1c3..807feea5f1 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v3 - name: Download CLI - run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v3.1.0/aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip + run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v6.1.1/aptos-cli-6.1.1-Ubuntu-22.04-x86_64.zip - name: Unzip CLI run: unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index 96dd1e68c9..dd37da7c41 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -10,6 +10,9 @@ on: jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/fortuna steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v2 @@ -26,6 +29,6 @@ jobs: - name: Clippy check run: cargo clippy --tests -- --deny warnings if: success() || failure() - - name: Run executor tests + - name: Run tests run: cargo test if: success() || failure() diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index a4cb1f3283..30835d2722 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -10,6 +10,9 @@ on: jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: apps/hermes/server steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v2 diff --git a/.github/workflows/ci-pythnet-sdk.yml b/.github/workflows/ci-pythnet-sdk.yml index 09a439ae83..7e33385b67 100644 --- a/.github/workflows/ci-pythnet-sdk.yml +++ b/.github/workflows/ci-pythnet-sdk.yml @@ -10,6 +10,9 @@ on: jobs: test: runs-on: ubuntu-latest + defaults: + run: + working-directory: pythnet/pythnet_sdk steps: - uses: actions/checkout@v2 - uses: Swatinem/rust-cache@v2 From 218bcecfd11c4bd7e3c347ce69179e1035be7673 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 08:00:44 -0700 Subject: [PATCH 06/10] fix aptos --- .github/workflows/ci-aptos-contract.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 807feea5f1..5aacee8d37 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -23,7 +23,7 @@ jobs: run: wget https://github.com/aptos-labs/aptos-core/releases/download/aptos-cli-v6.1.1/aptos-cli-6.1.1-Ubuntu-22.04-x86_64.zip - name: Unzip CLI - run: unzip aptos-cli-3.1.0-Ubuntu-22.04-x86_64.zip + run: unzip aptos-cli-6.1.1-Ubuntu-22.04-x86_64.zip - name: Check Formatting run: ./aptos move fmt From 57042ddc977797507b5b03840c08d6b206273cfe Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 08:43:02 -0700 Subject: [PATCH 07/10] hm --- .github/workflows/ci-aptos-contract.yml | 3 +++ .github/workflows/ci-message-buffer.yml | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 5aacee8d37..0c02995936 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -25,6 +25,9 @@ jobs: - name: Unzip CLI run: unzip aptos-cli-6.1.1-Ubuntu-22.04-x86_64.zip + - name: Install movefmt + run: ./aptos update movefmt + - name: Check Formatting run: ./aptos move fmt if: success() || failure() diff --git a/.github/workflows/ci-message-buffer.yml b/.github/workflows/ci-message-buffer.yml index 49733892c3..27a2a4328b 100644 --- a/.github/workflows/ci-message-buffer.yml +++ b/.github/workflows/ci-message-buffer.yml @@ -34,6 +34,10 @@ jobs: - name: Install Anchor run: | cargo install --git https://github.com/coral-xyz/anchor --tag v0.27.0 anchor-cli --locked + - name: Install g++ 12 + run: | + sudo apt-get install g++-12 + echo "CXX=/usr/bin/g++-12" >> "${GITHUB_ENV}" # Libusb is a build requirement for the node-hid package and so pnpm # install will fail if this isn't in the build environment and if a # precompiled binary isn't found. From afd202ad7e91343917eb08be72104a00c9da6b21 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 08:49:35 -0700 Subject: [PATCH 08/10] hm --- .../aptos/contracts/sources/governance/governance_action.move | 1 + 1 file changed, 1 insertion(+) diff --git a/target_chains/aptos/contracts/sources/governance/governance_action.move b/target_chains/aptos/contracts/sources/governance/governance_action.move index 77a5bd2ca5..d9ee369da1 100644 --- a/target_chains/aptos/contracts/sources/governance/governance_action.move +++ b/target_chains/aptos/contracts/sources/governance/governance_action.move @@ -11,6 +11,7 @@ module pyth::governance_action { value: u8, } + #[lint::skip(unnecessary_numerical_extreme_comparison)] public fun from_u8(value: u8): GovernanceAction { assert!(CONTRACT_UPGRADE <= value && value <= SET_STALE_PRICE_THRESHOLD, error::invalid_governance_action()); GovernanceAction { value } From 37b0de90191d1130ef92eee639d34e86be8d1553 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 17:31:42 +0000 Subject: [PATCH 09/10] ci: remove workflow file paths from PR triggers and redundant if conditions Co-Authored-By: Jayant Krishnamurthy --- .github/workflows/ci-aptos-contract.yml | 4 ---- .github/workflows/ci-cosmwasm-contract.yml | 1 - .github/workflows/ci-fortuna.yml | 4 ---- .github/workflows/ci-fuel-contract.yml | 4 ++++ .github/workflows/ci-hermes-server.yml | 4 ---- .github/workflows/ci-lazer-rust.yml | 5 ----- .github/workflows/ci-remote-executor.yml | 4 ---- .github/workflows/ci-solana-contract.yml | 6 ------ 8 files changed, 4 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 0c02995936..0954f980d9 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -1,7 +1,6 @@ on: pull_request: paths: - - .github/workflows/ci-aptos-contract.yml - target_chains/aptos/contracts/** push: branches: @@ -30,12 +29,9 @@ jobs: - name: Check Formatting run: ./aptos move fmt - if: success() || failure() - name: Lint run: ./aptos move lint --check-test-code --dev - if: success() || failure() - name: Run tests run: ./aptos move test - if: success() || failure() diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index cdac37b467..f20f1ca716 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -3,7 +3,6 @@ name: Test CosmWasm Contract on: pull_request: paths: - - .github/workflows/ci-cosmwasm-contract.yml - target_chains/cosmwasm/** - wormhole_attester/sdk/rust/** push: diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index dd37da7c41..90c23c80f3 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -3,7 +3,6 @@ name: Check Fortuna on: pull_request: paths: - - .github/workflows/ci-fortuna.yml - apps/fortuna/** push: branches: [main] @@ -25,10 +24,7 @@ jobs: override: true - name: Format check run: cargo fmt --all -- --check - if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings - if: success() || failure() - name: Run tests run: cargo test - if: success() || failure() diff --git a/.github/workflows/ci-fuel-contract.yml b/.github/workflows/ci-fuel-contract.yml index 2b3015a419..1911b84965 100644 --- a/.github/workflows/ci-fuel-contract.yml +++ b/.github/workflows/ci-fuel-contract.yml @@ -32,6 +32,10 @@ jobs: run: forc test --verbose - name: Rust add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown + - name: Format check + run: cargo fmt --all -- --check + - name: Clippy check + run: cargo clippy --tests -- --deny warnings - name: Build run: cargo build --verbose - name: Run tests diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index 30835d2722..f5b8be99bc 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -3,7 +3,6 @@ name: Check Hermes Server on: pull_request: paths: - - .github/workflows/ci-hermes-server.yml - apps/hermes/server/** push: branches: [main] @@ -30,10 +29,7 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Format check run: cargo fmt --all -- --check - if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings - if: success() || failure() - name: Run executor tests run: cargo test - if: success() || failure() diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index f744f8e582..23141680fb 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -5,7 +5,6 @@ on: - main pull_request: paths: - - .github/workflows/ci-lazer-rust.yml - lazer/** jobs: @@ -39,13 +38,9 @@ jobs: run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; - name: Format check run: cargo fmt --all -- --check - if: success() || failure() - name: Clippy check run: cargo clippy --all-targets -- --deny warnings - if: success() || failure() - name: Build Solana programs run: cargo build-sbf - if: success() || failure() - name: test run: cargo test - if: success() || failure() diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index 170ba01e73..504a39c9c9 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -3,7 +3,6 @@ name: Check Remote Executor on: pull_request: paths: - - .github/workflows/ci-remote-executor.yml - governance/remote_executor/** push: branches: [main] @@ -31,10 +30,7 @@ jobs: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check run: cargo fmt --all -- --check - if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings - if: success() || failure() - name: Run executor tests run: cargo test-sbf - if: success() || failure() diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index b6d1c905bb..370798a2e9 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -3,7 +3,6 @@ name: Test Solana Contract on: pull_request: paths: - - .github/workflows/ci-solana-contract.yml - target_chains/solana/** - pythnet/pythnet_sdk/** push: @@ -35,16 +34,11 @@ jobs: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check run: cargo fmt --all -- --check - if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings - if: success() || failure() - name: Build run: cargo-build-sbf - if: success() || failure() - name: Run tests run: cargo-test-sbf - if: success() || failure() - name: Run sdk tests run: cargo test --package pyth-solana-receiver-sdk - if: success() || failure() From 6fb0b9dffd7fcab875b89d54d1e6772166f6fe31 Mon Sep 17 00:00:00 2001 From: Jayant Krishnamurthy Date: Wed, 12 Mar 2025 11:20:16 -0700 Subject: [PATCH 10/10] Revert "ci: remove workflow file paths from PR triggers and redundant if conditions" This reverts commit 37b0de90191d1130ef92eee639d34e86be8d1553. --- .github/workflows/ci-aptos-contract.yml | 4 ++++ .github/workflows/ci-cosmwasm-contract.yml | 1 + .github/workflows/ci-fortuna.yml | 4 ++++ .github/workflows/ci-fuel-contract.yml | 4 ---- .github/workflows/ci-hermes-server.yml | 4 ++++ .github/workflows/ci-lazer-rust.yml | 5 +++++ .github/workflows/ci-remote-executor.yml | 4 ++++ .github/workflows/ci-solana-contract.yml | 6 ++++++ 8 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-aptos-contract.yml b/.github/workflows/ci-aptos-contract.yml index 0954f980d9..0c02995936 100644 --- a/.github/workflows/ci-aptos-contract.yml +++ b/.github/workflows/ci-aptos-contract.yml @@ -1,6 +1,7 @@ on: pull_request: paths: + - .github/workflows/ci-aptos-contract.yml - target_chains/aptos/contracts/** push: branches: @@ -29,9 +30,12 @@ jobs: - name: Check Formatting run: ./aptos move fmt + if: success() || failure() - name: Lint run: ./aptos move lint --check-test-code --dev + if: success() || failure() - name: Run tests run: ./aptos move test + if: success() || failure() diff --git a/.github/workflows/ci-cosmwasm-contract.yml b/.github/workflows/ci-cosmwasm-contract.yml index f20f1ca716..cdac37b467 100644 --- a/.github/workflows/ci-cosmwasm-contract.yml +++ b/.github/workflows/ci-cosmwasm-contract.yml @@ -3,6 +3,7 @@ name: Test CosmWasm Contract on: pull_request: paths: + - .github/workflows/ci-cosmwasm-contract.yml - target_chains/cosmwasm/** - wormhole_attester/sdk/rust/** push: diff --git a/.github/workflows/ci-fortuna.yml b/.github/workflows/ci-fortuna.yml index 90c23c80f3..dd37da7c41 100644 --- a/.github/workflows/ci-fortuna.yml +++ b/.github/workflows/ci-fortuna.yml @@ -3,6 +3,7 @@ name: Check Fortuna on: pull_request: paths: + - .github/workflows/ci-fortuna.yml - apps/fortuna/** push: branches: [main] @@ -24,7 +25,10 @@ jobs: override: true - name: Format check run: cargo fmt --all -- --check + if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings + if: success() || failure() - name: Run tests run: cargo test + if: success() || failure() diff --git a/.github/workflows/ci-fuel-contract.yml b/.github/workflows/ci-fuel-contract.yml index 1911b84965..2b3015a419 100644 --- a/.github/workflows/ci-fuel-contract.yml +++ b/.github/workflows/ci-fuel-contract.yml @@ -32,10 +32,6 @@ jobs: run: forc test --verbose - name: Rust add wasm32-unknown-unknown target run: rustup target add wasm32-unknown-unknown - - name: Format check - run: cargo fmt --all -- --check - - name: Clippy check - run: cargo clippy --tests -- --deny warnings - name: Build run: cargo build --verbose - name: Run tests diff --git a/.github/workflows/ci-hermes-server.yml b/.github/workflows/ci-hermes-server.yml index f5b8be99bc..30835d2722 100644 --- a/.github/workflows/ci-hermes-server.yml +++ b/.github/workflows/ci-hermes-server.yml @@ -3,6 +3,7 @@ name: Check Hermes Server on: pull_request: paths: + - .github/workflows/ci-hermes-server.yml - apps/hermes/server/** push: branches: [main] @@ -29,7 +30,10 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} - name: Format check run: cargo fmt --all -- --check + if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings + if: success() || failure() - name: Run executor tests run: cargo test + if: success() || failure() diff --git a/.github/workflows/ci-lazer-rust.yml b/.github/workflows/ci-lazer-rust.yml index 23141680fb..f744f8e582 100644 --- a/.github/workflows/ci-lazer-rust.yml +++ b/.github/workflows/ci-lazer-rust.yml @@ -5,6 +5,7 @@ on: - main pull_request: paths: + - .github/workflows/ci-lazer-rust.yml - lazer/** jobs: @@ -38,9 +39,13 @@ jobs: run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \; - name: Format check run: cargo fmt --all -- --check + if: success() || failure() - name: Clippy check run: cargo clippy --all-targets -- --deny warnings + if: success() || failure() - name: Build Solana programs run: cargo build-sbf + if: success() || failure() - name: test run: cargo test + if: success() || failure() diff --git a/.github/workflows/ci-remote-executor.yml b/.github/workflows/ci-remote-executor.yml index 504a39c9c9..170ba01e73 100644 --- a/.github/workflows/ci-remote-executor.yml +++ b/.github/workflows/ci-remote-executor.yml @@ -3,6 +3,7 @@ name: Check Remote Executor on: pull_request: paths: + - .github/workflows/ci-remote-executor.yml - governance/remote_executor/** push: branches: [main] @@ -30,7 +31,10 @@ jobs: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check run: cargo fmt --all -- --check + if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings + if: success() || failure() - name: Run executor tests run: cargo test-sbf + if: success() || failure() diff --git a/.github/workflows/ci-solana-contract.yml b/.github/workflows/ci-solana-contract.yml index 370798a2e9..b6d1c905bb 100644 --- a/.github/workflows/ci-solana-contract.yml +++ b/.github/workflows/ci-solana-contract.yml @@ -3,6 +3,7 @@ name: Test Solana Contract on: pull_request: paths: + - .github/workflows/ci-solana-contract.yml - target_chains/solana/** - pythnet/pythnet_sdk/** push: @@ -34,11 +35,16 @@ jobs: echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH - name: Format check run: cargo fmt --all -- --check + if: success() || failure() - name: Clippy check run: cargo clippy --tests -- --deny warnings + if: success() || failure() - name: Build run: cargo-build-sbf + if: success() || failure() - name: Run tests run: cargo-test-sbf + if: success() || failure() - name: Run sdk tests run: cargo test --package pyth-solana-receiver-sdk + if: success() || failure()