Skip to content

Modernizing Core Library #20

Modernizing Core Library

Modernizing Core Library #20

Workflow file for this run

name: RSpec
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
ruby-version: ['2.7', '3.2']
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies (Ubuntu)
if: startsWith(matrix.platform, 'ubuntu-')
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev libgl1-mesa-dev libfontconfig1-dev xvfb
- name: Install dependencies (macOS)
if: startsWith(matrix.platform, 'macos-')
run: brew install sdl2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run tests (Linux)
if: startsWith(matrix.platform, 'ubuntu-')
run: xvfb-run --auto-servernum bundle exec rake
- name: Run tests (not Linux)
if: (!startsWith(matrix.platform, 'ubuntu-'))
run: bundle exec rake