Update actions yml #58
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-latest | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3 | |
bundler-cache: true | |
- name: Run rubocop | |
run: bundle exec rake rubocop | |
test-ubuntu: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
ruby-version: [2.7, 3.3, 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@v4 | |
- 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 headless test | |
uses: coactions/setup-xvfb@v1 | |
with: | |
options: "0 -ac $DISPLAY 1024x768x24 > /dev/null 2>&1 &" | |
run: bundle exec rake spec | |
test-windows: | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
ruby-version: [2.7, 3.3, 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@v4 | |
- 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-13 | |
strategy: | |
matrix: | |
ruby-version: [2.7, 3.3] | |
steps: | |
- name: Cancel any previous run(s) on new commit push | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- 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 |