Skip to content

Commit e1e0c06

Browse files
authored
ci: replace travis with github actions (#62)
* ci: replace travis with github actions * git: improve gitignore * gems: update gemspec for ruby 3 * github: add codeql security workflow * github: refine build workflow conditions
1 parent c67c269 commit e1e0c06

File tree

6 files changed

+134
-30
lines changed

6 files changed

+134
-30
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: Build
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- develop
8+
push:
9+
branches:
10+
- develop
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: ruby/setup-ruby@v1
18+
with:
19+
ruby-version: 3.0
20+
- name: Install Dependencies
21+
run: |
22+
git submodule update --init
23+
bundle install
24+
- name: Run Tests
25+
run: |
26+
rspec

.github/workflows/codeql.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: CodeQL
3+
4+
on:
5+
pull_request:
6+
branches:
7+
- develop
8+
push:
9+
branches:
10+
- develop
11+
schedule:
12+
-
13+
cron: "45 1 * * 3"
14+
15+
jobs:
16+
analyze:
17+
name: Analyze
18+
runs-on: ubuntu-latest
19+
permissions:
20+
actions: read
21+
contents: read
22+
security-events: write
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
language:
27+
- ruby
28+
steps:
29+
- name: "Checkout repository"
30+
uses: actions/checkout@v2
31+
- name: "Initialize CodeQL"
32+
uses: github/codeql-action/init@v1
33+
with:
34+
languages: "${{ matrix.language }}"
35+
- name: Autobuild
36+
uses: github/codeql-action/autobuild@v1
37+
- name: "Perform CodeQL Analysis"
38+
uses: github/codeql-action/analyze@v1

.gitignore

Lines changed: 40 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,43 @@
1-
/.bundle/
2-
/.yardoc
3-
/Gemfile.lock
4-
/_yardoc/
1+
*.DS_Store
2+
3+
/test/test_vectors.rb
4+
/ext/digest/Makefile
5+
/ext/digest/keccak.so
6+
/ext/digest/mkmf.log
7+
8+
*.o
9+
*.so
10+
*.gem
11+
*.log
12+
*.rbc
13+
/.config
14+
/.rake_tasks~
515
/coverage/
6-
/doc/
16+
/InstalledFiles
717
/pkg/
8-
/spec/reports/
918
/tmp/
10-
.ruby-version
19+
20+
# RSpec configuration and generated files:
21+
/.rspec
22+
/spec/examples.txt
23+
24+
# Documentation cache and generated files:
25+
/.yardoc/
26+
/_yardoc/
27+
/doc/
28+
/rdoc/
29+
30+
# Environment normalization:
31+
/.bundle/
32+
/vendor/bundle/*
33+
!/vendor/bundle/.keep
34+
/lib/bundler/man/
35+
36+
# For a library or gem, you might want to ignore these files since the code is
37+
# intended to run in multiple environments; otherwise, check them in:
38+
/Gemfile.lock
39+
/.ruby-version
40+
/.ruby-gemset
41+
42+
# Unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
43+
.rvmrc

.travis.yml

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

Gemfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

3-
# Specify your gem's dependencies in ethereum-tx.gemspec
5+
# Specify your gem's dependencies in eth.gemspec
46
gemspec

eth.gemspec

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,46 @@
1+
# frozen_string_literal: true
12
# coding: utf-8
2-
lib = File.expand_path('../lib', __FILE__)
3-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3+
4+
lib = File.expand_path('lib', __dir__).freeze
5+
$LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib
6+
47
require 'eth/version'
58

69
Gem::Specification.new do |spec|
710
spec.name = "eth"
811
spec.version = Eth::VERSION
9-
spec.authors = ["Steve Ellis"]
10-
spec.email = ["[email protected]"]
12+
spec.authors = ["Steve Ellis", "Afri Schoedon"]
13+
1114

1215
spec.summary = %q{Simple API to sign Ethereum transactions.}
1316
spec.description = %q{Library to build, parse, and sign Ethereum transactions.}
1417
spec.homepage = "https://github.com/se3000/ruby-eth"
1518
spec.license = "MIT"
1619

20+
spec.metadata = {
21+
'homepage_uri' => 'https://github.com/se3000/ruby-eth',
22+
'source_code_uri' => 'https://github.com/se3000/ruby-eth',
23+
'github_repo' => 'https://github.com/se3000/ruby-eth',
24+
'bug_tracker_uri' => 'https://github.com/se3000/ruby-eth/issues',
25+
}.freeze
26+
1727
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
1828
spec.bindir = "exe"
1929
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2030
spec.require_paths = ["lib"]
31+
spec.test_files = spec.files.grep %r{^(test|spec|features)/}
2132

2233
spec.add_dependency 'keccak', '~> 1.2'
23-
spec.add_dependency 'ffi', '~> 1.0'
24-
spec.add_dependency 'money-tree', '~> 0.10.0'
25-
spec.add_dependency 'rlp', '~> 0.7.3'
26-
spec.add_dependency 'scrypt', '~> 3.0.6'
27-
28-
spec.add_development_dependency 'pry', '~> 0.1'
29-
spec.add_development_dependency 'rake', '>= 12.3.3'
30-
spec.add_development_dependency 'rspec', '~> 3.0'
34+
spec.add_dependency 'ffi', '~> 1.15'
35+
spec.add_dependency 'money-tree', '~> 0.10'
36+
spec.add_dependency 'rlp', '~> 0.7'
37+
spec.add_dependency 'scrypt', '~> 3.0'
38+
39+
spec.platform = Gem::Platform::RUBY
40+
spec.required_ruby_version = ">= 2.2", "< 4.0"
41+
42+
spec.add_development_dependency 'bundler', '~> 2.2'
43+
spec.add_development_dependency 'pry', '~> 0.14'
44+
spec.add_development_dependency 'rake', '~> 13.0'
45+
spec.add_development_dependency 'rspec', '~> 3.10'
3146
end

0 commit comments

Comments
 (0)