.github/workflows/test.yml in capybara-screenshot-diff-1.6.3 vs .github/workflows/test.yml in capybara-screenshot-diff-1.7.0

- old
+ new

@@ -12,23 +12,28 @@ env: BUNDLE_GEMFILE: 'gemfiles/rails70_gems.rb' FERRUM_PROCESS_TIMEOUT: '15' WD_CACHE_TIME: '864000' # 10 days +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: test: name: Functional Testing - runs-on: ubuntu-20.04 # In order to install libvips 8.9+ version + runs-on: ubuntu-22.04 # In order to install libvips 8.9+ version + timeout-minutes: 5 steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: '3.0' + ruby-version: '3.1' bundler-cache: true - name: Install libvips run: sudo apt install libvips libvips-dev libvips-tools @@ -36,46 +41,48 @@ run: bundle exec rake test env: COVERAGE: enabled - name: Upload Screenshots - if: ${{ always() }} - uses: actions/upload-artifact@v2 + if: always() + uses: actions/upload-artifact@v3 with: - path: test/fixtures/app/doc/screenshots/ + name: screenshots + retention-days: 1 + path: | + test/fixtures/app/doc/screenshots/ + tmp/capybara/screenshots-diffs/ - name: Upload Coverage - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v3 with: name: coverage + retention-days: 1 path: coverage matrix: name: Test Integration Rails & Ruby needs: [ 'test' ] runs-on: ubuntu-20.04 + timeout-minutes: 5 strategy: matrix: - ruby-version: [ '3.1', '3.0', '2.7', '2.6', 'jruby' ] + ruby-version: [ '3.1', '3.0', '2.7', 'jruby' ] gemfile: + - 'rails70_gems.rb' - 'rails61_gems.rb' - 'rails60_gems.rb' - - 'rails52.gemfile' - include: - - ruby-version: 2.7 - gemfile: rails70_gems.rb - - ruby-version: 3.0 - gemfile: rails70_gems.rb - - ruby-version: 3.1 - gemfile: rails70_gems.rb + exclude: + - ruby-version: 'jruby' + gemfile: 'rails70_gems.rb' env: BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }} steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: ${{ matrix.ruby-version }} @@ -89,10 +96,11 @@ matrix_screenshot_driver: name: Test Integration Capybara & Image Drivers needs: [ 'test' ] runs-on: ubuntu-20.04 + timeout-minutes: 5 strategy: matrix: screenshot-driver: [ 'vips', 'chunky_png' ] capybara-driver: [ 'selenium_headless', 'selenium_chrome_headless' ] @@ -100,11 +108,11 @@ - screenshot-driver: 'chunky_png' capybara-driver: 'cuprite' steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Ruby uses: ruby/setup-ruby@v1 with: ruby-version: '3.1' @@ -116,5 +124,15 @@ - name: Run tests run: bundle exec rake test:integration env: SCREENSHOT_DRIVER: ${{ matrix.screenshot-driver }} CAPYBARA_DRIVER: ${{ matrix.capybara-driver }} + + - name: Upload Screenshots + uses: actions/upload-artifact@v3 + if: failure() + with: + name: screenshots-${{ matrix.screenshot-driver }}-${{ matrix.capybara-driver }} + retention-days: 1 + path: | + test/fixtures/app/doc/screenshots/ + tmp/capybara/screenshots-diffs/