diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml index ed13ae18..9a05058d 100644 --- a/.github/workflows/changelog.yml +++ b/.github/workflows/changelog.yml @@ -5,13 +5,18 @@ on: tags: - "[0-9]+.[0-9]+.[0-9]+" +permissions: + contents: read + jobs: release: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Create GitHub release uses: softprops/action-gh-release@v2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1fa3f7bd..641c074d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,13 +12,18 @@ on: - minor - patch +permissions: + contents: read + jobs: release: runs-on: ubuntu-latest + permissions: + contents: write steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 ssh-key: ${{ secrets.RELEASE_SSH_KEY }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 64f53eb6..5467dc22 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -4,11 +4,16 @@ on: schedule: - cron: "30 1 * * *" +permissions: + contents: read + jobs: stale: runs-on: ubuntu-22.04 + permissions: + issues: write steps: - - uses: actions/stale@v9 + - uses: actions/stale@v10 with: repo-token: ${{ secrets.GITHUB_TOKEN }} days-before-stale: 60 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 2b156bca..db3e2262 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,13 +8,16 @@ on: branches: - master +permissions: + contents: read + jobs: rubocop: name: Rubocop runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Ruby 3.4 uses: ruby/setup-ruby@v1 with: @@ -26,6 +29,8 @@ jobs: rspec: name: Rspec ruby-${{ matrix.ruby }}-oj-${{ matrix.oj }} runs-on: ubuntu-latest + permissions: + contents: write needs: rubocop strategy: fail-fast: false @@ -34,7 +39,7 @@ jobs: oj: [false, true] steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 env: @@ -43,43 +48,13 @@ jobs: ruby-version: ${{ matrix.ruby }} bundler-cache: true - name: Test - uses: paambaati/codeclimate-action@v9.0.0 env: - CC_TEST_REPORTER_ID: be263ef9412dc65a7aa8dfb6e8162d5c7cfb3307fae0a444cde9dd6ca6f52848 WITH_OJ_GEM: ${{ matrix.oj }} RUBY_VERSION: ${{ matrix.ruby }} - with: - coverageCommand: bundle exec rake test:coverage - coverageLocations: coverage/coverage.json:simplecov + run: bundle exec rake test - name: Upload report - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v6 with: name: allure-results-${{ matrix.ruby }}-oj-${{ matrix.oj }} path: "*/reports/allure-results/" retention-days: 1 - - report: - name: Allure report - runs-on: ubuntu-latest - needs: rspec - if: always() - steps: - - name: Download allure-results - uses: actions/download-artifact@v4 - - name: Publish allure report - uses: andrcuns/allure-publish-action@v2.9.0 - env: - GOOGLE_CLOUD_CREDENTIALS_JSON: ${{ secrets.GOOGLE_CLOUD_CREDENTIALS_JSON }} - GITHUB_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - ALLURE_JOB_NAME: rspec - with: - storageType: gcs - resultsGlob: "**/allure-results" - bucket: allure-test-reports - prefix: allure-ruby/$GITHUB_REF - updatePr: description - summary: behaviors - copyLatest: true - ignoreMissingResults: false - summaryTableType: ascii - debug: true diff --git a/.ruby-version b/.ruby-version index 6cb9d3dd..4f5e6973 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.4.3 +3.4.5 diff --git a/ALLURE_VERSION b/ALLURE_VERSION index 295b40e7..67d9e1b3 100644 --- a/ALLURE_VERSION +++ b/ALLURE_VERSION @@ -1 +1 @@ -2.27.0 \ No newline at end of file +2.28.0 \ No newline at end of file diff --git a/Gemfile b/Gemfile index 8f69a7b4..0f09424d 100644 --- a/Gemfile +++ b/Gemfile @@ -9,18 +9,17 @@ gem "allure-ruby-commons", path: "allure-ruby-commons" group :development do gem "colorize", "~> 1.1.0" gem "debug", "~> 1.8" - gem "rake", "~> 13.2.1" - gem "ruby-lsp", "~> 0.23.9" + gem "rake", "~> 13.3.0" gem "semver2", "~> 3.4" - gem "solargraph", "~> 0.54.0" + gem "solargraph", "~> 0.57.0" end group :test do gem "climate_control", "~> 1.2.0" gem "oj", "~> 3.14" if ENV["WITH_OJ_GEM"] == "true" gem "rspec", "~> 3.13.0" - gem "rubocop", "~> 1.75.1" - gem "rubocop-performance", "~> 1.25.0" + gem "rubocop", "~> 1.81.6" + gem "rubocop-performance", "~> 1.26.0" gem "simplecov", "~> 0.22.0" gem "simplecov-console", "~> 0.9.1" end diff --git a/README.md b/README.md index c8f8be31..5417601d 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,7 @@ [![Gem Version](https://badge.fury.io/rb/allure-ruby-commons.svg)](https://rubygems.org/gems/allure-ruby-commons) [![Total Downloads](https://img.shields.io/gem/dt/allure-ruby-commons?color=blue)](https://rubygems.org/gems/allure-ruby-commons) ![Workflow status](https://github.com/allure-framework/allure-ruby/workflows/Test/badge.svg) -[![Maintainability](https://api.codeclimate.com/v1/badges/3190a4c9e68f20dd82ec/maintainability)](https://codeclimate.com/github/allure-framework/allure-ruby/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/3190a4c9e68f20dd82ec/test_coverage)](https://codeclimate.com/github/allure-framework/allure-ruby/test_coverage) [![Yard Docs](https://img.shields.io/badge/yard-docs-blue.svg)](https://rubydoc.info/github/allure-framework/allure-ruby/master) -[![Test Report](https://img.shields.io/badge/report-allure-blue.svg)](https://storage.googleapis.com/allure-test-reports/allure-ruby/refs/heads/master/index.html) Ruby testing framework adaptors for generating allure compatible test reports. diff --git a/allure-cucumber/allure-cucumber.gemspec b/allure-cucumber/allure-cucumber.gemspec index 8079c165..c69d130c 100644 --- a/allure-cucumber/allure-cucumber.gemspec +++ b/allure-cucumber/allure-cucumber.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |s| s.add_dependency "allure-ruby-commons", version s.add_dependency "csv", ">= 3.0", "< 4.0" - s.add_dependency "cucumber", ">= 4.0.0", "< 10" + s.add_dependency "cucumber", ">= 4.0.0", "< 11" end diff --git a/allure-ruby-commons/allure-ruby-commons.gemspec b/allure-ruby-commons/allure-ruby-commons.gemspec index 8d4d8a24..ae906ce1 100644 --- a/allure-ruby-commons/allure-ruby-commons.gemspec +++ b/allure-ruby-commons/allure-ruby-commons.gemspec @@ -30,5 +30,5 @@ Gem::Specification.new do |s| s.add_dependency "mime-types", ">= 3.3", "< 4" s.add_dependency "require_all", ">= 2", "< 4" - s.add_dependency "rspec-expectations", "~> 3.12" + s.add_dependency "rspec-expectations", "~> 3.13" end diff --git a/allure-ruby-commons/lib/allure_ruby_commons/config.rb b/allure-ruby-commons/lib/allure_ruby_commons/config.rb index 7681e6c4..91915f1e 100644 --- a/allure-ruby-commons/lib/allure_ruby_commons/config.rb +++ b/allure-ruby-commons/lib/allure_ruby_commons/config.rb @@ -31,7 +31,7 @@ def initialize # # @return [String] def environment - return(@environment) if defined?(@environment) + return @environment if defined?(@environment) @environment ||= ENV["ALLURE_ENVIRONMENT"] end diff --git a/allure-ruby-commons/spec/unit/allure_spec.rb b/allure-ruby-commons/spec/unit/allure_spec.rb index d74a2a37..1440696f 100644 --- a/allure-ruby-commons/spec/unit/allure_spec.rb +++ b/allure-ruby-commons/spec/unit/allure_spec.rb @@ -39,7 +39,7 @@ def lifecycle aggregate_failures do expect(label).to eq(Allure::Label.new("epic", "Test Epic")) - expect(labels.count { |it| it.name == "epic" }).to eq(1) + expect(labels.count { |label| label.name == "epic" }).to eq(1) end end @@ -49,7 +49,7 @@ def lifecycle aggregate_failures do expect(label).to eq(Allure::Label.new("feature", "Test Feature")) - expect(labels.count { |it| it.name == "feature" }).to eq(1) + expect(labels.count { |label| label.name == "feature" }).to eq(1) end end @@ -59,7 +59,7 @@ def lifecycle aggregate_failures do expect(label).to eq(Allure::Label.new("story", "Test Story")) - expect(labels.count { |it| it.name == "story" }).to eq(1) + expect(labels.count { |label| label.name == "story" }).to eq(1) end end @@ -69,7 +69,7 @@ def lifecycle aggregate_failures do expect(label).to eq(Allure::Label.new("suite", "Test Suite")) - expect(labels.count { |it| it.name == "suite" }).to eq(1) + expect(labels.count { |label| label.name == "suite" }).to eq(1) end end diff --git a/lib/task_helpers/simplecov_merger.rb b/lib/task_helpers/simplecov_merger.rb index 01aee6fc..483a6ea8 100644 --- a/lib/task_helpers/simplecov_merger.rb +++ b/lib/task_helpers/simplecov_merger.rb @@ -35,7 +35,7 @@ def groups end def multiformatter - [SimpleCov::Formatter::Console].yield_self do |formatters| + [SimpleCov::Formatter::Console].then do |formatters| formatters << SimpleCov::Formatter::HTMLFormatter if ENV["COV_HTML_REPORT"] formatters << SimpleCov::Formatter::JSONFormatter if ENV["CC_TEST_REPORTER_ID"] SimpleCov::Formatter::MultiFormatter.new(formatters)