Skip to content

Commit 494bba1

Browse files
authored
Merge pull request #15 from twingly/run-ci-on-actions
Run CI on GitHub Actions
2 parents 7603cf9 + bbce4c0 commit 494bba1

5 files changed

Lines changed: 64 additions & 32 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: CI build and install gem
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v2
14+
15+
- name: Setup Ruby
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 2.7.2
19+
20+
- name: Build and install gem
21+
run: gem build *.gemspec && gem install *.gem

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
11+
services:
12+
toxiproxy:
13+
image: shopify/toxiproxy
14+
ports:
15+
- 8080:8080 # port for the http_host "toxic"
16+
- 8474:8474 # port for controlling toxiproxy
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
include:
22+
- { ruby: 2.5.8 }
23+
- { ruby: 2.6.6 }
24+
- { ruby: 2.7.2 }
25+
- { ruby: head, allow-failure: true }
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: Setup Ruby ${{ matrix.ruby }}
32+
uses: ruby/setup-ruby@v1
33+
with:
34+
ruby-version: ${{ matrix.ruby }}
35+
bundler-cache: true
36+
37+
- name: Run tests
38+
run: bundle exec rake
39+
continue-on-error: ${{ matrix.allow-failure || false }}
40+
env:
41+
RSPEC_FORMATTER: progress

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Twingly::HTTP
22

3-
[![Build Status](https://travis-ci.com/twingly/twingly-http.svg?branch=master)](https://travis-ci.com/twingly/twingly-http)
3+
[![GitHub Build Status](https://github.com/twingly/twingly-http/workflows/CI/badge.svg?branch=master)](https://github.com/twingly/twingly-http/actions)
44

55
Robust HTTP client, tailored by Twingly.
66

twingly-http.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
1212
s.summary = "Robust HTTP client"
1313
s.description = "Robust HTTP client tailored by Twingly"
1414
s.license = "MIT"
15-
s.required_ruby_version = "~> 2.5"
15+
s.required_ruby_version = ">= 2.5"
1616

1717
s.add_dependency "faraday", "~> 1", ">= 1.0.1"
1818
s.add_dependency "faraday_middleware", "~> 1.0.0"

0 commit comments

Comments
 (0)