Skip to content
This repository has been archived by the owner on Jan 16, 2024. It is now read-only.

Commit

Permalink
Add Rust workflow (#31)
Browse files Browse the repository at this point in the history
* Add Rust test workflow

* Remove explicit build step

* Add cargo caching

* Adjust workflow steps order

* Upgrade to `actions/cache@v3`
  • Loading branch information
Noorts authored Dec 14, 2023
1 parent 3ab7b8b commit 11fd473
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Rust Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

# Setup Rust environment
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

# Cache dependencies and build outputs
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# Test Rust project
- name: Test Rust project
run: |
cd rust
cargo test --release

0 comments on commit 11fd473

Please sign in to comment.