Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: build-rust-projects
name: build-and-test-rust-projects

on:
merge_group:
Expand All @@ -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

Expand Down Expand Up @@ -45,3 +45,24 @@ jobs:
run: |
cd batcher
cargo build --all

test:
runs-on: ubuntu-latest
needs: build
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
cargo test --all