diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 914dd62..99cc54c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v6 - uses: ruby/setup-ruby@v1 with: - ruby-version: 4.0.5 + ruby-version: 3.3 bundler-cache: true - run: bundle config set --global path "$(pwd)/vendor/bundle" - run: bundle install --no-color diff --git a/test/test_workflows.rb b/test/test_workflows.rb new file mode 100644 index 0000000..ded8808 --- /dev/null +++ b/test/test_workflows.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +# SPDX-FileCopyrightText: Copyright (c) 2024-2026 Zerocracy +# SPDX-License-Identifier: MIT + +require 'minitest/autorun' +require 'yaml' + +class TestWorkflows < Minitest::Test + def test_codecov_uses_rake_ruby_version + root = File.expand_path('..', __dir__) + c = YAML.safe_load_file(File.join(root, '.github', 'workflows', 'codecov.yml')) + r = YAML.safe_load_file(File.join(root, '.github', 'workflows', 'rake.yml')) + ss = c.fetch('jobs').fetch('codecov').fetch('steps') + s = ss.find { |step| step['uses'] == 'ruby/setup-ruby@v1' } + cv = s.fetch('with').fetch('ruby-version') + m = r.fetch('jobs').fetch('rake').fetch('strategy').fetch('matrix') + rv = m.fetch('ruby').first + assert_equal(rv, cv) + end +end