Skip to content

Commit

Permalink
Update gems and switch Travis CI to GitHub Actions in the template
Browse files Browse the repository at this point in the history
  • Loading branch information
knu committed Oct 28, 2024
1 parent 59f0fac commit 8e9baa4
Show file tree
Hide file tree
Showing 7 changed files with 80 additions and 28 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: CI

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
run-tests:
name: ${{ matrix.os }} ruby-${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
ruby:
- "3.2"
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
bundler: latest
bundler-cache: true

- name: Run tests
run: bundle exec rake
6 changes: 0 additions & 6 deletions .travis.yml

This file was deleted.

12 changes: 6 additions & 6 deletions huginn_agent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

spec.add_runtime_dependency 'thor'
spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "rspec", "~> 3.4"
spec.add_development_dependency "simplecov", "~> 0.11.2"
spec.add_development_dependency "guard", "~> 2.13.0"
spec.add_development_dependency "guard-rspec", "~> 4.6.5"
spec.add_development_dependency "bundler", "~> 2.5"
spec.add_development_dependency "rake", ">= 12.3.3"
spec.add_development_dependency "rspec", "~> 3.12"
spec.add_development_dependency "simplecov", "~> 0.12"
spec.add_development_dependency "guard", "~> 2.18"
spec.add_development_dependency "guard-rspec", "~> 4.7"
end
2 changes: 1 addition & 1 deletion lib/huginn_agent/cli/new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def run
"newagent.gemspec.tt" => "#{gem_name}.gemspec",
"Rakefile.tt" => "Rakefile",
"README.md.tt" => "README.md",
"travis.yml.tt" => ".travis.yml"
".github/workflows/ci.yml.tt" => ".github/workflows/ci.yml"
}

if thor.yes?(MIT_QUESTION)
Expand Down
37 changes: 37 additions & 0 deletions lib/huginn_agent/templates/newagent/.github/workflows/ci.yml.tt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI

on:
push:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
run-tests:
name: ${{ matrix.os }} ruby-${{ matrix.ruby }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-20.04
database_adapter:
- mysql2
- postgresql
ruby:
- "3.2"
steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: latest
bundler: latest
bundler-cache: true

- name: Run tests
run: bundle exec rake
4 changes: 2 additions & 2 deletions lib/huginn_agent/templates/newagent/newagent.gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
spec.test_files = Dir['spec/**/*.rb'].reject { |f| f[%r{^spec/huginn}] }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.7"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "bundler", "~> 2.5"
spec.add_development_dependency "rake", ">= 12.3.3"

spec.add_runtime_dependency "huginn_agent"
end
13 changes: 0 additions & 13 deletions lib/huginn_agent/templates/newagent/travis.yml.tt

This file was deleted.

0 comments on commit 8e9baa4

Please sign in to comment.