# This workflow will download a prebuilt Ruby version, install dependencies and # run tests with Rake # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby name: CI on: push: branches: [ master ] pull_request: branches: [ master ] schedule: - cron: '16 4 12 * *' jobs: test: runs-on: ubuntu-latest strategy: matrix: ruby: [2.6, 2.7, "3.0", "3.1"] steps: - uses: actions/checkout@v2 - name: Install non-ruby dependencies run: | sudo apt-get update sudo apt-get install libgtk-3-dev # Needed for gtk3 gem sudo apt-get install libgstreamer1.0-dev # Needed for gstreamer gem sudo apt-get install libgoocanvas-2.0-dev # Needed for GooCanvas::Canvas widget sudo apt-get install libyaz-dev # Needed for zoom gem sudo apt-get install intltool # Needed for intltool-merge executable sudo apt-get install gconf2 # Needed for gconftool-2 executable sudo apt-get install at-spi2-core # Needed to provide A11y dbus service to silence warnings sudo apt-get install gstreamer1.0-plugins-good # Needed to set up sound player pipeline sudo apt-get install pulseaudio # Needed to play sound sudo apt-get install xvfb # Provides xvfb-run sudo apt-get install yaru-theme-icon # Needed to avoid warnings about missing icons on Ubuntu 20.04 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Run unit tests run: xvfb-run bundle exec rake spec:unit - name: Run end-to-end tests in a dbus session run: xvfb-run dbus-run-session bundle exec rake spec:end_to_end rubocop: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install non-ruby dependencies run: | sudo apt-get update # Needed for gtk3 gem sudo apt-get install libgtk-3-dev # Needed for gstreamer gem sudo apt-get install libgstreamer1.0-dev # Needed for zoom gem sudo apt-get install libyaz-dev - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: 2.7 bundler-cache: true - name: Run RuboCop run: bundle exec rubocop -P