forked from ippa/chingu
-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (34 loc) · 1.1 KB
/
rspec.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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