Fix GitHub Actions #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |