Skip to content

Add CI workflow

Add CI workflow #4

Workflow file for this run

---
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
ruby-version:
- "2.7"
- "3.0"
- "3.1"
- "3.2"
- "3.3"
- "3.4"
# exclude:
# - os: windows-latest
# ruby-version: "3.2"
steps:
- run: |
echo "Commit msg: ${{ github.event.head_commit.message }}"
- uses: actions/checkout@v4
- name: Set up Ruby & Rust
uses: oxidize-rb/actions/setup-ruby-and-rust@main
with:
ruby-version: ${{ matrix.ruby-version }}
rubygems: "3.3.26"
bundler-cache: true
cargo-cache: true
cache-version: v5
- name: Compile extension
run: bundle exec rake compile
- name: Run ruby tests
run: bundle exec rake spec
- name: Run ruby tests (hard-mode with GC.stress)
run: bundle exec rake spec
env:
GC_STRESS: "true"
- name: Lint rust
run: cargo clippy -- -D warnings && cargo fmt --check