Skip to content

Commit

Permalink
Merge pull request #3290 from ashie/gha-mac-os
Browse files Browse the repository at this point in the history
GitHub Actions: Add macOS and remove .travis.yml
  • Loading branch information
cosmo0920 authored Mar 10, 2021
2 parents fa6614a + 59ba008 commit 4d03e73
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 79 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/macos-test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Testing on macOS

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

jobs:
test:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
ruby-version: ['head', '2.7']
os: [macos-latest]
experimental: [true]

name: Unit testing with Ruby ${{ matrix.ruby-version }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Install dependencies
run: bundle install
- name: Run tests
run: bundle exec rake test
77 changes: 0 additions & 77 deletions .travis.yml

This file was deleted.

7 changes: 5 additions & 2 deletions test/plugin_helper/test_child_process.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding: utf-8
require_relative '../helper'
require 'fluent/plugin_helper/child_process'
require 'fluent/plugin/base'
Expand Down Expand Up @@ -269,10 +270,12 @@ def configure(conf)
Timeout.timeout(TEST_DEADLOCK_TIMEOUT) do
ran = false
@d.child_process_execute(:t4, "ruby -e 'Signal.trap(:TERM, nil); while sleep 0.1; puts 1; STDOUT.flush rescue nil; end'", mode: [:read]) do |io|
m.lock
ran = true
begin
while line = io.readline
unless ran
m.lock
ran = true
end
ary << line
end
rescue
Expand Down

0 comments on commit 4d03e73

Please sign in to comment.