Skip to content

Commit

Permalink
Replace from CircleCI to GitHubActions
Browse files Browse the repository at this point in the history
  • Loading branch information
w-masahiro-ct committed Jan 23, 2025
1 parent 9ce2445 commit 796f8bb
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 49 deletions.
48 changes: 0 additions & 48 deletions .circleci/config.yml

This file was deleted.

24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint
on:
pull_request:
paths:
- '.github/workflows/lint.yml'
- '.rubocop.yml'
- 'Gemfile*'
- 'Rakefile'
- 'fluent-plugin-kubernetes_metadata_filter.gemspec'
- '**/*.rb'
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: RuboCop
run: bundle exec rake rubocop
40 changes: 40 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Test
on:
pull_request:
paths:
- '.github/workflows/test.yml'
- 'Gemfile*'
- 'Rakefile'
- 'fluent-plugin-kubernetes_metadata_filter.gemspec'
- '**/*.rb'
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby-version:
- '2.7'
- '3.0'
- '3.1'
- '3.2'
- '3.3'
- '3.4'
- 'ruby-head'
steps:
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Run tests
run: bundle exec rake test
- name: Upload coverage results
if: matrix.ruby-version == '2.7'
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage/
2 changes: 1 addition & 1 deletion fluent-plugin-kubernetes_metadata_filter.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
gemspec = File.basename(__FILE__)
spec.files = IO.popen(['git', 'ls-files', '-z'], chdir: __dir__, err: IO::NULL) do |ls|
ls.readlines("\x0", chomp: true).reject do |f|
(f == gemspec) || f.start_with?('coverage/', 'test/', '.git', '.gitignore', '.circleci', '.rubocop.yml', 'Gemfile')
(f == gemspec) || f.start_with?('coverage/', 'test/', '.git', '.github', '.gitignore', '.rubocop.yml', 'Gemfile')
end
end

Expand Down

0 comments on commit 796f8bb

Please sign in to comment.