diff --git a/.github/workflows/clippy-checks.yml b/.github/workflows/clippy-checks.yml new file mode 100644 index 000000000..fc5704602 --- /dev/null +++ b/.github/workflows/clippy-checks.yml @@ -0,0 +1,38 @@ +name: Clippy Checks + +on: + pull_request: + push: + branches: + - main + +jobs: + clippy-checks: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Free up Space and Installation + uses: ./.github/actions/shared + + - name: Clippy -- Main + uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references + + - name: Clippy -- All Targets (except integration) + uses: actions-rs/cargo@v1 + with: + command: clippy + # We are a bit more forgiving when it comes to the code in tests and only check for correctness + args: --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references + + - name: Clippy -- Integration + uses: actions-rs/cargo@v1 + with: + command: clippy + # We are a bit more forgiving when it comes to the code in tests and only check for correctness + args: --package runtime-integration-tests --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references + diff --git a/.github/workflows/test-benchmark.yml b/.github/workflows/test-benchmark.yml new file mode 100644 index 000000000..e6cd4b437 --- /dev/null +++ b/.github/workflows/test-benchmark.yml @@ -0,0 +1,32 @@ +name: Test Benchmark + +on: + pull_request: + push: + branches: + - main + +jobs: + test-code: + runs-on: ubuntu-latest + env: + # Make sure CI fails on all warnings, including Clippy lints + RUSTFLAGS: "-Dwarnings" + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Free up Space and Installation + uses: ./.github/actions/shared + + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Test For runtime benchmarks + uses: actions-rs/cargo@v1 + with: + command: test + args: --features=runtime-benchmarks,try-runtime \ No newline at end of file diff --git a/.github/workflows/test-code.yml b/.github/workflows/test-code.yml index daa6c045a..eb22b8e8b 100644 --- a/.github/workflows/test-code.yml +++ b/.github/workflows/test-code.yml @@ -5,13 +5,13 @@ on: push: branches: - main -env: - # Make sure CI fails on all warnings, including Clippy lints - RUSTFLAGS: "-Dwarnings" jobs: test-code: runs-on: ubuntu-latest + env: + # Make sure CI fails on all warnings, including Clippy lints + RUSTFLAGS: "-Dwarnings" steps: - name: Checkout @@ -20,53 +20,12 @@ jobs: - name: Free up Space and Installation uses: ./.github/actions/shared - - name: Test - uses: actions-rs/cargo@v1 - with: - command: test - - test-benchmarks: - runs-on: ubuntu-latest - - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Free up Space and Installation - uses: ./.github/actions/shared - - - name: Test For runtime benchmarks - uses: actions-rs/cargo@v1 - with: - command: test - args: --features=runtime-benchmarks,try-runtime - - clippy-checks: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Free up Space and Installation - uses: ./.github/actions/shared - - - name: Clippy -- Main - uses: actions-rs/cargo@v1 + - name: Install Protoc + uses: arduino/setup-protoc@v1 with: - command: clippy - args: --all-features -- -W clippy::all -A clippy::style -A forgetting_copy_types -A forgetting_references + repo-token: ${{ secrets.GITHUB_TOKEN }} - - name: Clippy -- All Targets (except integration) - uses: actions-rs/cargo@v1 - with: - command: clippy - # We are a bit more forgiving when it comes to the code in tests and only check for correctness - args: --workspace --all-features --all-targets --exclude runtime-integration-tests -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references - - - name: Clippy -- Integration + - name: Test uses: actions-rs/cargo@v1 with: - command: clippy - # We are a bit more forgiving when it comes to the code in tests and only check for correctness - args: --package runtime-integration-tests --all-features --all-targets -- -A clippy::all -W clippy::correctness -A forgetting_copy_types -A forgetting_references - + command: test \ No newline at end of file