Skip to content

Commit 163c28f

Browse files
committed
Replace from CircleCI to GitHubActions
1 parent e349151 commit 163c28f

File tree

4 files changed

+65
-49
lines changed

4 files changed

+65
-49
lines changed

.circleci/config.yml

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

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Lint
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/workflows/lint.yml'
6+
- '.rubocop.yml'
7+
- 'Gemfile*'
8+
- 'Rakefile'
9+
- 'fluent-plugin-kubernetes_metadata_filter.gemspec'
10+
- '**/*.rb'
11+
permissions:
12+
contents: read
13+
jobs:
14+
lint:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Set up Ruby
19+
uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: 2.7
22+
bundler-cache: true
23+
- name: RuboCop
24+
run: bundle exec rake rubocop

.github/workflows/test.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Test
2+
on:
3+
pull_request:
4+
paths:
5+
- '.github/workflows/test.yml'
6+
- 'Gemfile*'
7+
- 'Rakefile'
8+
- 'fluent-plugin-kubernetes_metadata_filter.gemspec'
9+
- '**/*.rb'
10+
permissions:
11+
contents: read
12+
jobs:
13+
test:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
ruby-version:
19+
- '2.7'
20+
- '3.0'
21+
- '3.1'
22+
- '3.2'
23+
- '3.3'
24+
- '3.4'
25+
- 'ruby-head'
26+
steps:
27+
- uses: actions/checkout@v4
28+
- name: Set up Ruby
29+
uses: ruby/setup-ruby@v1
30+
with:
31+
ruby-version: ${{ matrix.ruby-version }}
32+
bundler-cache: true
33+
- name: Run tests
34+
run: bundle exec rake test
35+
- name: Upload coverage results
36+
if: matrix.ruby-version == '2.7'
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: coverage
40+
path: coverage/

fluent-plugin-kubernetes_metadata_filter.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
1616
gemspec = File.basename(__FILE__)
1717
spec.files = IO.popen(['git', 'ls-files', '-z'], chdir: __dir__, err: IO::NULL) do |ls|
1818
ls.readlines("\x0", chomp: true).reject do |f|
19-
(f == gemspec) || f.start_with?('coverage/', 'test/', '.git', '.circleci', '.rubocop.yml', 'Gemfile')
19+
(f == gemspec) || f.start_with?('coverage/', 'test/', '.git', '.rubocop.yml', 'Gemfile')
2020
end
2121
end
2222

0 commit comments

Comments
 (0)