Skip to content

Commit

Permalink
Merge pull request #151 from Shopify/github-actions
Browse files Browse the repository at this point in the history
Use GitHub Actions for CI
  • Loading branch information
tenderlove committed Apr 29, 2021
2 parents 8fac55d + 8f54cb9 commit 3e2ef85
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 67 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,43 @@
name: CI

on: [push, pull_request]

jobs:
rubies:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: [ ruby-head, '3.0', '2.7', '2.6', '2.5', '2.4', '2.3', '2.2' ]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run test
run: rake
- name: Install gem
run: rake install
platforms:
strategy:
matrix:
os: [macos, windows]
ruby: ['3.0']
runs-on: ${{ matrix.os }}-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
- name: Run test
run: rake
- name: Install gem
run: rake install
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

21 changes: 0 additions & 21 deletions Dockerfile

This file was deleted.

36 changes: 11 additions & 25 deletions Rakefile
@@ -1,31 +1,17 @@
task :default => :test
require "bundler/gem_tasks"
require "rake/testtask"

# ==========================================================
# Packaging
# ==========================================================

GEMSPEC = Gem::Specification::load('stackprof.gemspec')

require 'rubygems/package_task'
Gem::PackageTask.new(GEMSPEC) do |pkg|
Rake::TestTask.new(:test) do |t|
t.libs << "test"
t.libs << "lib"
t.test_files = FileList["test/**/test_*.rb"]
end

# ==========================================================
# Ruby Extension
# ==========================================================
require "rake/extensiontask"

require 'rake/extensiontask'
Rake::ExtensionTask.new('stackprof', GEMSPEC) do |ext|
ext.lib_dir = 'lib/stackprof'
Rake::ExtensionTask.new("stackprof") do |ext|
ext.ext_dir = "ext/stackprof"
ext.lib_dir = "lib/stackprof"
end
task :build => :compile

# ==========================================================
# Testing
# ==========================================================

require 'rake/testtask'
Rake::TestTask.new 'test' do |t|
t.test_files = FileList['test/test_*.rb']
end
task :test => :build
task default: %i(compile test)

0 comments on commit 3e2ef85

Please sign in to comment.