Ruby CI #96
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
name: Ruby CI | |
on: | |
push: | |
paths: | |
- 'ruby/**' | |
- '.github/workflows/ruby**' | |
pull_request: | |
paths: | |
- 'ruby/**' | |
- '.github/workflows/ruby**' | |
schedule: | |
# weekly build every FRI | |
- cron: "0 6 * * 5" | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ ubuntu-latest, macos-latest, windows-latest ] | |
ruby: ['2.6', '3.1'] | |
runs-on: ${{ matrix.os }} | |
name: Ruby ${{ matrix.ruby }} Build on ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby }} | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
#### BEGIN ruby minitest | |
- name: ruby minitest | |
working-directory: ruby/minitest | |
run: ruby -I test test/*_test.rb -n test_pass | |
- name: ruby minitest, assure one failing test | |
working-directory: ruby/minitest | |
run: "sh ../../.scripts/assure_failing_test.sh 'ruby test/foo_test.rb' '1) Failure:\nFooTest#test_ask_returns_an_answer'" | |
#### END ruby minitest | |
#### BEGIN ruby rspec | |
- name: ruby rspec | |
working-directory: ruby/rspec | |
run: "bundle install && sh ../../.scripts/assure_failing_test.sh 'bundle exec rspec' 'Failure/Error: expect(42).to eq(43)'" | |
#### END ruby rspec |