Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 0 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ require:

AllCops:
NewCops: enable
TargetRubyVersion: 2.5
Exclude:
- 'extra/**/*.rb'
- 'vendor/**/*'
Expand Down
3 changes: 1 addition & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
11 changes: 4 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -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|
Expand All @@ -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
9 changes: 6 additions & 3 deletions smart_proxy_dhcp_remote_isc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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