Skip to content

Commit

Permalink
Merge pull request #49 from nbulaj/gh-ci
Browse files Browse the repository at this point in the history
Migrate to Github actions
  • Loading branch information
nbulaj authored Feb 4, 2022
2 parents ec7aaba + 878743a commit 47bf193
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 40 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: CI

on: [push, pull_request]

jobs:
build:
name: >-
Ruby ${{ matrix.ruby }} (${{ matrix.gemfile }})
env:
CI: true

runs-on: ${{ matrix.os }}
if: |
!( contains(github.event.pull_request.title, '[ci skip]')
|| contains(github.event.pull_request.title, '[skip ci]'))
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest ]
ruby:
- 2.6
- 2.7
- '3.0'
- '3.1'
- head
gemfile:
- gemfiles/oga.gemfile
- gemfiles/nokogiri.gemfile
steps:
- name: Repo checkout
uses: actions/checkout@v2

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run tests
timeout-minutes: 10
run: bundle exec rake spec
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ gem "oga", "~> 3.2"
gem "rubocop", "~> 1.0"

group :test do
gem "coveralls", require: false
gem "coveralls_reborn", require: false
# Until I find a way to introduce other MITM proxy
gem "webrick", "1.4.2"
gem "evil-proxy", "~> 0.2"
Expand Down
2 changes: 1 addition & 1 deletion gemfiles/nokogiri.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gemspec path: "../"
gem "nokogiri", "~> 1.8"

group :test do
gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "webrick"
gem "evil-proxy", "~> 0.2"
end
2 changes: 1 addition & 1 deletion gemfiles/oga.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ gemspec path: "../"
gem "oga", "~> 3.0"

group :test do
gem "coveralls", require: false
gem "coveralls_reborn", require: false
gem "webrick"
gem "evil-proxy", "~> 0.2"
end
2 changes: 1 addition & 1 deletion lib/proxy_fetcher/providers/free_proxy_list.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def provider_url

# [NOTE] Doesn't support filtering
def xpath
'//table[@id="proxylisttable"]/tbody/tr'
"//table[./thead/tr/th[contains(text(), 'IP')]]/tbody/tr"
end

# Converts HTML node (entry of N tags) to <code>ProxyFetcher::Proxy</code>
Expand Down
2 changes: 1 addition & 1 deletion lib/proxy_fetcher/providers/free_proxy_list_socks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def provider_url

# [NOTE] Doesn't support filtering
def xpath
'//table[@id="proxylisttable"]/tbody/tr'
"//table[./thead/tr/th[contains(text(), 'IP')]]/tbody/tr"
end

# Converts HTML node (entry of N tags) to <code>ProxyFetcher::Proxy</code>
Expand Down
2 changes: 1 addition & 1 deletion lib/proxy_fetcher/providers/free_proxy_list_ssl.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def provider_url

# [NOTE] Doesn't support filtering
def xpath
'//table[@id="proxylisttable"]/tbody/tr'
"//table[./thead/tr/th[contains(text(), 'IP')]]/tbody/tr"
end

# Converts HTML node (entry of N tags) to <code>ProxyFetcher::Proxy</code>
Expand Down
2 changes: 1 addition & 1 deletion lib/proxy_fetcher/providers/free_proxy_list_us.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def provider_url

# [NOTE] Doesn't support filtering
def xpath
'//table[@id="proxylisttable"]/tbody/tr'
"//table[./thead/tr/th[contains(text(), 'IP')]]/tbody/tr"
end

# Converts HTML node (entry of N tags) to <code>ProxyFetcher::Proxy</code>
Expand Down
4 changes: 2 additions & 2 deletions lib/proxy_fetcher/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ module VERSION
# Major version number
MAJOR = 0
# Minor version number
MINOR = 15
MINOR = 16
# Smallest version number
TINY = 1
TINY = 0

# Full version number
STRING = [MAJOR, MINOR, TINY].compact.join(".")
Expand Down
2 changes: 1 addition & 1 deletion proxy_fetcher.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Gem::Specification.new do |gem|
gem.license = "MIT"
gem.required_ruby_version = ">= 2.3.0"

gem.add_runtime_dependency "http", ">= 3", "< 5"
gem.add_runtime_dependency "http", ">= 3"

gem.add_development_dependency "rake", ">= 12.0"
gem.add_development_dependency "rspec", "~> 3.9"
Expand Down

0 comments on commit 47bf193

Please sign in to comment.