Skip to content

CI Matrix Testing

CI Matrix Testing #431

Workflow file for this run

# testing
name: CI Matrix Testing
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '21 3 * * *'
permissions:
contents: read
jobs:
test:
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos]
ruby: [3.1, 3.4]
container: ${{ (matrix.os == 'ubuntu' && matrix.ruby == '3.4') && 'rubydistros/ubuntu-24.04:3.4' || '' }}
steps:
- uses: actions/checkout@v2
- run: |
if [ "$RUNNER_OS" == "Linux" ]; then
if [ "${{ matrix.ruby }}" == "3.1" ]; then
# For Ruby 3.1 on standard Ubuntu runner
sudo apt-get update && sudo apt-get install -y graphviz libarchive-dev
elif [ "${{ matrix.ruby }}" == "3.4" ]; then
# For Ruby 3.4 in custom container, install without sudo
apt-get update && apt-get install -y graphviz libarchive-dev
fi
elif [ "$RUNNER_OS" == "Windows" ]; then
choco install graphviz
elif [ "$RUNNER_OS" == "macOS" ]; then
brew install graphviz libarchive
else
echo "$RUNNER_OS not supported"
exit 1
fi
shell: bash
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: ${{ matrix.ruby }}
- run: bundle exec rake spec
if: always()
- run: bundle exec rake features
if: always()
- run: bundle exec rake style
if: always()