From b4b26db5478bfd70da4c15367d9210c89948f0ff Mon Sep 17 00:00:00 2001 From: adfoster-r7 Date: Tue, 19 Jul 2022 17:24:53 +0100 Subject: [PATCH] Run Ubuntu 22.04 in test matrix --- .github/workflows/verify.yml | 31 +++++++++++++++++++++++++++---- Gemfile | 2 +- spec/spec_helper.rb | 8 +------- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index e84878891..f1f634d2c 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -1,5 +1,21 @@ name: Verify +# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions +permissions: + actions: none + checks: none + contents: none + deployments: none + id-token: none + issues: none + discussions: none + packages: none + pages: none + pull-requests: none + repository-projects: none + security-events: none + statuses: none + on: push: branches: @@ -10,7 +26,7 @@ on: jobs: test: - runs-on: ubuntu-18.04 + runs-on: ${{ matrix.os }} timeout-minutes: 40 strategy: @@ -19,15 +35,22 @@ jobs: ruby: - 2.6 - 2.7 - - 3.0.3 - - 3.1.1 + - 3.0 + - 3.1 + os: + - ubuntu-18.04 + - ubuntu-22.04 + exclude: + - { os: ubuntu-22.04, ruby: 2.6 } + - { os: ubuntu-22.04, ruby: 2.7 } + - { os: ubuntu-22.04, ruby: 3.0 } test_cmd: - bundle exec rspec env: RAILS_ENV: test - name: Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }} + name: ${{ matrix.os }} - Ruby ${{ matrix.ruby }} - ${{ matrix.test_cmd }} steps: - name: Checkout code uses: actions/checkout@v2 diff --git a/Gemfile b/Gemfile index 6a0cd1f2e..084dce1ba 100644 --- a/Gemfile +++ b/Gemfile @@ -9,7 +9,7 @@ end group :test do # simplecov test formatter and uploader for Coveralls.io - gem "coveralls", '~>0.8.23', :require => false + gem 'coveralls', require: false # Testing gem 'rspec' # Coverage reports diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 8bc4bd002..3e5554a8e 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -6,13 +6,7 @@ require 'coveralls' require 'ruby_smb' -if ENV['CI'] == 'true' - # don't generate local report as it is inaccessible on travis-ci, which is - # why coveralls is being used. - SimpleCov.formatter = Coveralls::SimpleCov::Formatter -else - SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter -end +SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter Dir['./spec/support/**/*.rb'].sort.each { |f| require f }