Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #151 from Shopify/github-actions
Use GitHub Actions for CI
- Loading branch information
Showing
4 changed files
with
54 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |