Skip to content

fix: dont setup rust in ci #4

fix: dont setup rust in ci

fix: dont setup rust in ci #4

Workflow file for this run

name: Rust CI
on: [push, pull_request]
jobs:
setup:
name: Set up and Cache
runs-on: ubuntu-latest
outputs:
cache-hit: ${{ steps.cache.outputs.cache-hit }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Cache Cargo registry and build
id: cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-
- name: Build project
run: cargo build --release
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Restore Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run unit tests from root
run: cargo test --release
integration-tests:
name: Run integration tests
runs-on: ubuntu-latest
needs: setup
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Restore Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run integration tests in `tests`
run: |
cd tests
cargo test --release