Skip to content

Commit

Permalink
Add CI using GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ekohl committed Sep 28, 2023
1 parent 999fc5b commit 93e44af
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 13 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: CI

on:
pull_request:
push:
branch: master

concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: true

jobs:
unit:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- ruby: '2.7'
puppet: 7
- ruby: '3.2'
puppet: 8
env:
PUPPET_GEM_VERSION: "~> ${{ matrix.puppet }}.0"
name: "Ruby ${{ matrix.ruby }} with Puppet ${{ matrix.puppet }}"
steps:
- uses: actions/checkout@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 1 addition & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ source 'https://rubygems.org'

gemspec

puppet_version = ENV['PUPPET_VERSION']
puppet_spec = puppet_version ? "~> #{puppet_version}" : '< 7.0.0'
gem 'puppet', puppet_spec
gem 'puppet', ENV.fetch('PUPPET_GEM_VERSION', '< 9')

0 comments on commit 93e44af

Please sign in to comment.