Default Linux display to :0 #54
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: Tests | |
on: [push, pull_request] | |
jobs: | |
lint: | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 2.5 | |
bundler-cache: true | |
- name: Run rubocop | |
run: bundle exec rake rubocop | |
test-ubuntu: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [2.7, jruby] | |
env: | |
DISPLAY: ":0" | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- name: Set up ffmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: setup-ffmpeg | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Start xvfb | |
run: Xvfb -ac $DISPLAY -screen 0 1024x768x24 > /dev/null 2>&1 & | |
- name: Run tests | |
run: bundle exec rake spec | |
test-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
ruby-version: [2.5, jruby] | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- name: Set up ffmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: setup-ffmpeg | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake spec | |
test-macos: | |
runs-on: macos-latest | |
strategy: | |
matrix: | |
ruby-version: [2.5, 2.7] | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v2 | |
- name: Set up ffmpeg | |
uses: FedericoCarboni/setup-ffmpeg@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
id: setup-ffmpeg | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler-cache: true | |
- name: Run tests | |
run: bundle exec rake spec |