Skip to content

Commit

Permalink
SRE-3058 Run specs with GitHub actions (#6)
Browse files Browse the repository at this point in the history
* Run specs with GitHub actions

* remove travis. refine gemspec

* reset authors config

* update checkout action version

* relax gem version constraints

* remove coveralls. fix deprecated value

* add back simplecov gem

* refactor multi formatter

* add workflow badge

* remove comment
  • Loading branch information
Sam Giffney authored Apr 14, 2023
1 parent 56b81cf commit 2674ba9
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 29 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/run-specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Run specs
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby 2.7
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
- name: Install dependencies
run: |
gem install bundler
bundle install
- name: Run specs
run: bundle exec rspec
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# USI

[![Code Climate](https://codeclimate.com/github/jobready/usi.png)](https://codeclimate.com/github/jobready/usi)
[![Build Status](https://travis-ci.org/jobready/usi.svg)](https://travis-ci.org/jobready/usi)
[![Gem Downloads](https://img.shields.io/gem/dt/usi.svg)](https://rubygems.org/gems/usi)
![specs workflow](https://github.com/rdytech/usi/actions/workflows/run-specs.yml/badge.svg)

A gem for validating USI (Unique Student Identifiers) for VET Students in Australia

Expand Down Expand Up @@ -56,7 +57,7 @@ end

## Contributing

1. Fork it ( http://github.com/jobready/usi/fork )
1. Fork it ( http://github.com/rdytech/usi/fork )
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
Expand Down
9 changes: 1 addition & 8 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
require 'simplecov'
SimpleCov.start

require 'coveralls'
Coveralls.wear!

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
SimpleCov::Formatter::HTMLFormatter,
Coveralls::SimpleCov::Formatter,
]
SimpleCov.formatter = SimpleCov::Formatter::HTMLFormatter

SimpleCov.configure do
add_filter '/spec/'
Expand All @@ -17,7 +11,6 @@
Bundler.require(:default, :development)

RSpec.configure do |config|
config.treat_symbols_as_metadata_keys_with_true_values = true
config.run_all_when_everything_filtered = true
config.filter_run :focus
config.filter_run_excluding perf: true
Expand Down
19 changes: 9 additions & 10 deletions usi.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,24 @@ require 'usi/version'
Gem::Specification.new do |spec|
spec.name = 'usi'
spec.version = Usi::VERSION
spec.authors = ["John D'Agostino"]
spec.email = ['[email protected]']
spec.authors = ['ReadyTech']
spec.email = ['[email protected]']
spec.summary = %q{Validate Australian Government USI}
spec.description = %q{A gem for validating Australian Government Unique Student Identifiers (USI)}
spec.homepage = 'https://github.com/jobready/usi'
spec.homepage = 'https://github.com/rdytech/usi'
spec.license = 'MIT'

spec.required_rubygems_version = '>= 1.3.6'

spec.add_development_dependency 'bundler', '~> 1.0'
spec.add_development_dependency 'rspec', '~> 2.14'
spec.add_development_dependency 'cane', '~> 2.6'
spec.add_development_dependency 'byebug', '~> 2.7'
spec.add_development_dependency 'rake', '~> 10.1'
spec.add_development_dependency 'coveralls', '~> 0'
spec.add_development_dependency 'bundler', '> 1.0'
spec.add_development_dependency 'rspec', '> 2.14'
spec.add_development_dependency 'cane', '> 2.6'
spec.add_development_dependency 'byebug', '> 2.7'
spec.add_development_dependency 'rake', '> 10.1'
spec.add_development_dependency 'simplecov', '> 0'

spec.files = `git ls-files -z`.split("\x0")
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
spec.require_paths = ['lib']
end

0 comments on commit 2674ba9

Please sign in to comment.