Skip to content

Merge pull request #47 from AlexanderStein/fix-test #96

Merge pull request #47 from AlexanderStein/fix-test

Merge pull request #47 from AlexanderStein/fix-test #96

Workflow file for this run

name: CI
on:
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
env:
CARGO_TERM_COLOR: always
jobs:
# Run the complete CI pipeline using the Makefile as source of truth
ci:
name: CI Pipeline
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run complete CI pipeline via Makefile
run: make ci-local
# Optional: Run on multiple Rust versions
test-matrix:
name: Test on ${{ matrix.rust }}
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v4
- name: Install Rust ${{ matrix.rust }}
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target/
key: ${{ runner.os }}-cargo-${{ matrix.rust }}-${{ hashFiles('**/Cargo.lock') }}
- name: Run tests
run: cargo test
continue-on-error: ${{ matrix.rust == 'nightly' }}