diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..057742d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,22 @@ +name: CI + +on: # yamllint disable-line rule:truthy + pull_request: + push: + branches: + - master + + +concurrency: + group: ${{ github.ref_name }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + rubocop: + name: Rubocop + uses: theforeman/actions/.github/workflows/rubocop.yml@v0 + + test: + name: Tests + needs: rubocop + uses: theforeman/actions/.github/workflows/smart_proxy_plugin.yml@v0 diff --git a/.rubocop.yml b/.rubocop.yml index a1c0590..1c59c8f 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -4,7 +4,6 @@ require: AllCops: NewCops: enable - TargetRubyVersion: 2.5 Exclude: - 'extra/**/*.rb' - 'vendor/**/*' diff --git a/Gemfile b/Gemfile index 69caa7b..2526d0f 100644 --- a/Gemfile +++ b/Gemfile @@ -10,12 +10,11 @@ group :rubocop do end group :test do - gem 'ci_reporter_test_unit' gem 'concurrent-ruby', '~> 1.0', require: 'concurrent' gem 'mocha' gem 'rack-test' gem 'rake' gem 'rsec', '< 1' - gem 'smart_proxy', :github => 'theforeman/smart-proxy', :branch => 'develop' + gem 'smart_proxy', :github => 'theforeman/smart-proxy', :branch => ENV.fetch('SMART_PROXY_BRANCH', 'develop') gem 'test-unit' end diff --git a/Rakefile b/Rakefile index a022a6f..02c1707 100644 --- a/Rakefile +++ b/Rakefile @@ -1,11 +1,13 @@ # frozen_string_literal: true -require 'ci/reporter/rake/test_unit' require 'rake' require 'rake/testtask' +require 'rubocop/rake_task' + +RuboCop::RakeTask.new desc 'Default: run unit tests.' -task :default => :test +task :default => %i[rubocop test] desc 'Test the Foreman Proxy plugin.' Rake::TestTask.new(:test) do |t| @@ -15,8 +17,3 @@ Rake::TestTask.new(:test) do |t| t.test_files = FileList['test/**/*_test.rb'] t.verbose = true end - -namespace :jenkins do - desc nil # No description means it's not listed in rake -T - task :unit => ['ci:setup:testunit', :test] -end diff --git a/smart_proxy_dhcp_remote_isc.gemspec b/smart_proxy_dhcp_remote_isc.gemspec index 19e14c5..7e7f5ed 100644 --- a/smart_proxy_dhcp_remote_isc.gemspec +++ b/smart_proxy_dhcp_remote_isc.gemspec @@ -5,16 +5,19 @@ require File.expand_path('lib/smart_proxy_dhcp_remote_isc/version', __dir__) Gem::Specification.new do |s| s.name = 'smart_proxy_dhcp_remote_isc' s.version = Proxy::DHCP::RemoteISC::VERSION - s.license = 'GPL-3.0' + s.license = 'GPL-3.0-only' s.authors = ['Dmitri Dolguikh'] s.email = ['dmitri@appliedlogic.ca'] s.homepage = 'https://github.com/theforeman/smart_proxy_dhcp_remote_isc' s.summary = "Smart-Proxy dhcp module provider for NFS-accessible ISC dhcpd installations" - s.description = "Smart-Proxy dhcp module provider for NFS-accessible ISC dhcpd installations" + s.description = <<~DESC + For integration with ISC dhcpd by providing the configuration and leases + over networked storage like NFS. + DESC s.files = Dir['{config,lib,bundler.d}/**/*'] + ['README.md', 'LICENSE'] s.test_files = Dir['test/**/*'] - s.required_ruby_version = '>= 2.5' + s.required_ruby_version = '>= 2.7' end