Skip to content

Commit 66dd2c9

Browse files
James Couballjcouball
James Couball
authored andcommitted
Switch CI from Travis to GitHub Actions
Signed-off-by: James Couball <jcouball@yahoo.com>
1 parent f9abb18 commit 66dd2c9

File tree

4 files changed

+51
-45
lines changed

4 files changed

+51
-45
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
continuous_integration_build:
11+
continue-on-error: true
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby: [2.3, 2.7]
16+
operating-system: [ubuntu-latest]
17+
include:
18+
- ruby: head
19+
operating-system: ubuntu-latest
20+
- ruby: truffleruby-head
21+
operating-system: ubuntu-latest
22+
- ruby: 2.7
23+
operating-system: windows-latest
24+
- ruby: jruby-head
25+
operating-system: windows-latest
26+
27+
name: Ruby ${{ matrix.ruby }} on ${{ matrix.operating-system }}
28+
29+
runs-on: ${{ matrix.operating-system }}
30+
31+
steps:
32+
- name: Checkout Code
33+
uses: actions/checkout@v2
34+
35+
- name: Setup Ruby
36+
uses: ruby/setup-ruby@v1
37+
with:
38+
ruby-version: ${{ matrix.ruby }}
39+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
40+
41+
- name: Run Build
42+
run: bundle exec rake

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ You can install Ruby/Git like this:
1616

1717
## Code Status
1818

19-
* [![Build Status](https://travis-ci.org/ruby-git/ruby-git.svg?branch=master)](https://travis-ci.org/ruby-git/ruby-git)
19+
* [![Build Status](https://github.com/ruby-git/ruby-git/workflows/CI/badge.svg?branch=master)](https://github.com/ruby-git/ruby-git/actions?query=workflow%3ACI)
2020
* [![Code Climate](https://codeclimate.com/github/ruby-git/ruby-git.png)](https://codeclimate.com/github/ruby-git/ruby-git)
2121
* [![Gem Version](https://badge.fury.io/rb/git.svg)](https://badge.fury.io/rb/git)
2222

tests/units/test_git_path.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,45 +3,45 @@
33
require File.dirname(__FILE__) + '/../test_helper'
44

55
class TestGitPath < Test::Unit::TestCase
6-
6+
77
def setup
88
set_file_paths
99
@git = Git.open(@wdir)
1010
end
11-
11+
1212
def test_initalize_with_good_path_and_check_path
1313
path = Git::Path.new(@git.index.to_s, true)
1414
assert_equal @git.index.to_s, path.to_s
1515
end
16-
16+
1717
def test_initialize_with_bad_path_and_check_path
1818
assert_raises ArgumentError do
1919
Git::Path.new('/this path does not exist', true)
2020
end
2121
end
22-
22+
2323
def test_initialize_with_bad_path_and_no_check
2424
path = Git::Path.new('/this path does not exist', false)
2525
assert path.to_s.end_with?('/this path does not exist')
2626

27-
assert(path.to_s.match(/^C?:?\/this path does not exist$/))
27+
assert(path.to_s.match(%r{^(?:[A-Z]:)?/this path does not exist$})
2828
end
2929

3030
def test_readables
3131
assert(@git.dir.readable?)
3232
assert(@git.index.readable?)
3333
assert(@git.repo.readable?)
3434
end
35-
35+
3636
def test_readables_in_temp_dir
3737
in_temp_dir do |dir|
3838
FileUtils.cp_r(@wdir, 'test')
3939
g = Git.open(File.join(dir, 'test'))
40-
40+
4141
assert(g.dir.writable?)
4242
assert(g.index.writable?)
4343
assert(g.repo.writable?)
4444
end
4545
end
46-
46+
4747
end

0 commit comments

Comments
 (0)