Skip to content

Commit

Permalink
run tests on push
Browse files Browse the repository at this point in the history
  • Loading branch information
Largo committed Feb 14, 2024
1 parent b217da6 commit 74cd87f
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/test-on-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Run Tests
on:
push:
branches:
- '*'
jobs:
build-and-release:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true

- name: Build stub and run tests
run: |
rake build_stub
rake test
8 changes: 6 additions & 2 deletions .github/workflows/windows-gem-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ jobs:

- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.2
ruby-version: 3.3.0
bundler-cache: true

- name: Build Gem
- name: Build stub and run tests
run: |
rake build_stub
rake test
- name: Build Gem
run: |
gem build
- name: Get Gem File Name
Expand Down
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,13 @@ task :release_docs => :redocs do
sh "pscp -r doc/* [email protected]:/var/www/gforge-projects/ocran"
end

task :test_single, [:test_name] do |t, args|
if args[:test_name].nil?
puts "You must provide a test name. e.g., rake test_single[YourTestClassName]"
else
sh "ruby #{File.join("test", "test_ocra.rb")} -n test_#{args[:test_name]}"
end
end


# vim: syntax=Ruby

0 comments on commit 74cd87f

Please sign in to comment.