From 6c0a0acfab887ebebfc29036ed84a0ac38d7742b Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Mon, 30 Sep 2024 18:24:55 -0300 Subject: [PATCH 1/5] ci: add batcher test job --- .github/workflows/build-rust.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-rust.yml b/.github/workflows/build-rust.yml index aa01321779..04acb8b0ae 100644 --- a/.github/workflows/build-rust.yml +++ b/.github/workflows/build-rust.yml @@ -7,13 +7,13 @@ on: pull_request: branches: ["*"] paths: - - 'batcher/**' - - '.github/workflows/build-rust.yml' + - "batcher/**" + - ".github/workflows/build-rust.yml" jobs: build: runs-on: aligned-runner - + steps: - uses: actions/checkout@v4 @@ -45,3 +45,13 @@ jobs: run: | cd batcher cargo build --all + + batcher-test: + runs-on: aligned-runner + needs: build + + steps: + - name: run-tests + run: | + cd batcher + cargo test --all From 444686000c6909bb5108c70e0b7c4029a575554a Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Mon, 30 Sep 2024 18:34:38 -0300 Subject: [PATCH 2/5] ci: rename rust action and add test step --- .../{build-rust.yml => build-and-test-rust.yml} | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) rename .github/workflows/{build-rust.yml => build-and-test-rust.yml} (90%) diff --git a/.github/workflows/build-rust.yml b/.github/workflows/build-and-test-rust.yml similarity index 90% rename from .github/workflows/build-rust.yml rename to .github/workflows/build-and-test-rust.yml index 04acb8b0ae..e3190dea15 100644 --- a/.github/workflows/build-rust.yml +++ b/.github/workflows/build-and-test-rust.yml @@ -1,4 +1,4 @@ -name: build-rust-projects +name: build-and-test-rust-projects on: merge_group: @@ -45,13 +45,7 @@ jobs: run: | cd batcher cargo build --all - - batcher-test: - runs-on: aligned-runner - needs: build - - steps: - - name: run-tests + - name: Run tests run: | cd batcher cargo test --all From cebc67ef726d5afe20e6a8258a56565a4f5ecb13 Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Tue, 1 Oct 2024 10:28:53 -0300 Subject: [PATCH 3/5] ci: separate build and test jobs --- .github/workflows/build-and-test-rust.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-and-test-rust.yml b/.github/workflows/build-and-test-rust.yml index e3190dea15..8ac3e50920 100644 --- a/.github/workflows/build-and-test-rust.yml +++ b/.github/workflows/build-and-test-rust.yml @@ -45,6 +45,13 @@ jobs: run: | cd batcher cargo build --all + + test: + runs-on: aligned-runner + needs: build + steps: + - name: Checkout code + uses: actions/checkout@v4 - name: Run tests run: | cd batcher From eb0949a163ae16646a92a5868c05f72b4da8c34a Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Tue, 1 Oct 2024 10:33:27 -0300 Subject: [PATCH 4/5] ci: add cache step for the batcher tests job --- .github/workflows/build-and-test-rust.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/build-and-test-rust.yml b/.github/workflows/build-and-test-rust.yml index 8ac3e50920..2ba2a67392 100644 --- a/.github/workflows/build-and-test-rust.yml +++ b/.github/workflows/build-and-test-rust.yml @@ -52,6 +52,16 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v4 + - name: Cache Rust dependencies + uses: actions/cache@v3 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + batcher/target + key: ${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-rust- - name: Run tests run: | cd batcher From fb360285aca0a8b9221bbff552ffab03f4d8f2c0 Mon Sep 17 00:00:00 2001 From: IAvecilla Date: Tue, 1 Oct 2024 15:03:42 -0300 Subject: [PATCH 5/5] ci: switch to ubuntu latest to run batch tests --- .github/workflows/build-and-test-rust.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-and-test-rust.yml b/.github/workflows/build-and-test-rust.yml index 2ba2a67392..6aafeba9ea 100644 --- a/.github/workflows/build-and-test-rust.yml +++ b/.github/workflows/build-and-test-rust.yml @@ -47,7 +47,7 @@ jobs: cargo build --all test: - runs-on: aligned-runner + runs-on: ubuntu-latest needs: build steps: - name: Checkout code