Skip to content

Commit

Permalink
Replace Travis CI with GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
infertux committed Aug 3, 2023
1 parent c79703a commit fedb268
Show file tree
Hide file tree
Showing 6 changed files with 286 additions and 209 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/test.yml
@@ -0,0 +1,38 @@
name: Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
kitchen:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
suite: [ "default-debian-11", "default-debian-11" ]
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby # latest stable release
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run Test Kitchen suite ${{ matrix.suite }}
run: bundle exec rake kitchen:${{ matrix.suite }}
style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ruby # latest stable release
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
- name: Run style checks
run: bundle exec rake style:ruby
8 changes: 6 additions & 2 deletions .kitchen.yml
Expand Up @@ -2,9 +2,13 @@
driver:
name: dokken
privileged: true # allows systemd services to start
chef_image: cincproject/cinc
chef_version: <%= ENV.fetch('CHEF_VERSION', 18) %>

provisioner:
name: dokken
product_name: cinc
chef_binary: /opt/cinc/bin/cinc-client
deprecations_as_errors: true
multiple_converge: 2
enforce_idempotency: true
Expand All @@ -25,9 +29,9 @@ platforms:
intermediate_instructions:
- RUN /usr/bin/apt-get update
- RUN /usr/bin/apt-get upgrade -y
- name: debian-10
- name: debian-12
driver:
image: dokken/debian-10
image: dokken/debian-12
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
Expand Down
19 changes: 19 additions & 0 deletions .rubocop.yml
@@ -0,0 +1,19 @@
AllCops:
NewCops: enable

Style/FrozenStringLiteralComment:
Enabled: false

Style/PercentLiteralDelimiters:
PreferredDelimiters:
"%i": "()"
"%w": "()"

Style/TrailingCommaInArrayLiteral:
EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: consistent_comma

Style/TrailingCommaInHashLiteral:
EnforcedStyleForMultiline: consistent_comma
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

11 changes: 3 additions & 8 deletions Gemfile
@@ -1,15 +1,10 @@
source 'https://rubygems.org'

group :development do
gem 'chef', '~> 16'
gem 'rake'
end

group :style do
gem 'cookstyle'
end
gem 'rake'

group :test do
gem 'berkshelf' # needed by test-kitchen
gem 'cookstyle'
gem 'kitchen-dokken'
gem 'kitchen-inspec'
gem 'test-kitchen'
Expand Down

0 comments on commit fedb268

Please sign in to comment.