Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build on GitHub Actions #34

Merged
merged 7 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Build

on:
push:
branches:
- master
pull_request:
types: [opened, synchronize, reopened]

jobs:
matrix:
runs-on: ubuntu-latest

strategy:
matrix:
ruby:
# インストールできないと言われる
# - 2.3.x
- 2.4.x
- 2.5.x
- 2.6.x
gemfile:
- rails42.gemfile
- rails50.gemfile
- rails51.gemfile
- rails52.gemfile
- rails60.gemfile
exclude:
- ruby: 2.3.x
gemfile: rails60.gemfile
- ruby: 2.4.x
gemfile: rails60.gemfile
- ruby: 2.5.x
gemfile: rails60.gemfile

env:
CI: true
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}

steps:
- uses: actions/checkout@v1

- name: Setup System
run: |
sudo apt-get update
sudo apt-get install libsqlite3-dev

- name: Set up Ruby ${{ matrix.ruby }}
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}

- name: Build
run: |
gem install bundler
bundle install --jobs 4 --retry 3

- name: Test
run: |
bundle exec rake

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel: true
path-to-lcov: ./coverage/lcov.info

- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## Unreleased

* GitHub Actions でビルドを実行するようにした (PR [#34](https://github.com/chocoby/jp_prefecture/pull/34)/[@chocoby](https://github.com/chocoby))

## 0.10.0 (Aug 19, 2019)

* Rails 6.0 をサポート (PR [#33](https://github.com/chocoby/jp_prefecture/pull/33)/[@chocoby](https://github.com/chocoby))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[**English**](README_EN.md)

[![Gem Version](http://img.shields.io/gem/v/jp_prefecture.svg?style=flat)](https://rubygems.org/gems/jp_prefecture)
[![Build Status](http://img.shields.io/travis/chocoby/jp_prefecture/master.svg?style=flat)](https://travis-ci.org/chocoby/jp_prefecture)
[![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture)
[![Coveralls](https://img.shields.io/coveralls/chocoby/jp_prefecture.svg)](https://coveralls.io/r/chocoby/jp_prefecture)

https://rubygems.org/gems/jp_prefecture
Expand Down
4 changes: 3 additions & 1 deletion README_EN.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# JpPrefecture

[**Japanese**](README.md)

[![Gem Version](http://img.shields.io/gem/v/jp_prefecture.svg?style=flat)](https://rubygems.org/gems/jp_prefecture)
[![Build Status](http://img.shields.io/travis/chocoby/jp_prefecture/master.svg?style=flat)](https://travis-ci.org/chocoby/jp_prefecture)
[![GitHub Actions](https://github.com/chocoby/jp_prefecture/workflows/Build/badge.svg)](https://github.com/chocoby/jp_prefecture)
[![Coveralls](https://img.shields.io/coveralls/chocoby/jp_prefecture.svg)](https://coveralls.io/r/chocoby/jp_prefecture)

https://rubygems.org/gems/jp_prefecture
Expand Down
5 changes: 3 additions & 2 deletions jp_prefecture.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ Gem::Specification.new do |gem|

gem.add_development_dependency 'rake'
gem.add_development_dependency 'rspec'
gem.add_development_dependency 'activerecord', '>= 3.2.0'
gem.add_development_dependency 'activerecord', '>= 4.2.0'
gem.add_development_dependency 'sqlite3'
gem.add_development_dependency 'coveralls'
gem.add_development_dependency 'simplecov'
gem.add_development_dependency 'simplecov-lcov'
gem.add_development_dependency 'appraisal'
end
12 changes: 9 additions & 3 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
# coding: utf-8
if ENV['CI']
require 'coveralls'
Coveralls.wear!
require 'simplecov'
require 'simplecov-lcov'
SimpleCov::Formatter::LcovFormatter.config do |c|
c.report_with_single_file = true
c.single_report_path = "coverage/lcov.info"
end
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
SimpleCov.start
end

require 'jp_prefecture'
require "jp_prefecture"
require "active_record"

RSpec.configure do |config|
Expand Down