Skip to content

Commit c823d59

Browse files
committed
Switch to Github actions
1 parent 7abb01d commit c823d59

File tree

7 files changed

+65
-48
lines changed

7 files changed

+65
-48
lines changed

.github/workflows/rubocop.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: RuboCop
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
8+
jobs:
9+
rubocop:
10+
name: Lint
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Install system dependencies
18+
run: sudo apt-get install -y libsystemd-dev
19+
20+
- name: Setup Ruby
21+
uses: ruby/setup-ruby@v1
22+
with:
23+
ruby-version: '3.4'
24+
bundler-cache: true
25+
26+
- name: Run RuboCop
27+
run: bundle exec rubocop

.github/workflows/ruby.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
name: Ruby ${{ matrix.ruby }}
11+
runs-on: ubuntu-latest
12+
continue-on-error: ${{ matrix.ruby == '2.0.0' }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
ruby: [3.1, 3.2, 3.3, 3.4]
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Install system dependencies
23+
run: sudo apt-get install -y libsystemd-dev
24+
25+
- name: Setup Ruby ${{ matrix.ruby }}
26+
uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{ matrix.ruby }}
29+
bundler-cache: true
30+
31+
- name: Test
32+
run: bundle exec rspec

.rubocop.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
AllCops:
22
Exclude:
33
- "spec/**/*"
4-
- "vendor/**/*"
5-
TargetRubyVersion: 2.5
4+
TargetRubyVersion: 3.1
65
SuggestExtensions: false
76
NewCops: enable
87

.travis.yml

Lines changed: 0 additions & 11 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# journald-logger
22

3+
[![CI](https://github.com/theforeman/journald-logger/actions/workflows/ruby.yml/badge.svg)](https://github.com/theforeman/journald-logger/actions/workflows/ruby.yml)
4+
[![RuboCop](https://github.com/theforeman/journald-logger/actions/workflows/rubocop.yml/badge.svg)](https://github.com/theforeman/journald-logger/actions/workflows/rubocop.yml)
5+
36
A Logger drop-in replacement that logs directly to systemd-journal with some additional features
47

58
## Usage
@@ -96,7 +99,7 @@ begin
9699
rescue => e
97100
logger.exception e # log exception with LOG_ERR level by default
98101
logger.exception e, severity: Logger::WARN # use Logger severity
99-
logger.exception e, priority: Journald::LOG_ALERT # use Syslog priority
102+
logger.exception e, priority: Journald::LOG_ALERT # use Syslog priority
100103
end
101104
```
102105

Rakefile

Lines changed: 0 additions & 33 deletions
This file was deleted.

journald-logger.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
1515
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
1616
spec.require_paths = ["lib"]
1717

18-
spec.required_ruby_version = ">= 2.5.0"
18+
spec.required_ruby_version = ">= 3.1.0"
1919

2020
spec.add_runtime_dependency "journald-native", "~> 1.0"
2121

0 commit comments

Comments
 (0)