-
Notifications
You must be signed in to change notification settings - Fork 4
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 #6 from google/workflows
Run RSpec tests for push and pull request events
- Loading branch information
Showing
5 changed files
with
35 additions
and
0 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,21 @@ | ||
name: Run RSpec tests | ||
on: [push, pull_request] | ||
jobs: | ||
run-rspec-tests: | ||
strategy: | ||
matrix: | ||
version: ['7.0', '6.0'] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2' | ||
bundler-cache: true # Runs 'bundle install' and caches installed gems automatically | ||
- name: Remove the default activerecord Gem | ||
run: bundle remove activerecord | ||
- name: Add a specific version of the activerecord Gem | ||
run: bundle add activerecord --version "~> ${{ matrix.version }}" --group "development,test" | ||
- name: Run tests | ||
run: ./run_tests.sh |
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,2 @@ | ||
# Ignore files related to RSpec tests | ||
foobar.db* |
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,8 @@ | ||
# Gemfile | ||
source "https://rubygems.org" | ||
|
||
group :development, :test do | ||
gem "activerecord" | ||
gem "rspec" | ||
gem "sqlite3" | ||
end |
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,3 @@ | ||
# Run RSpec tests | ||
bundle exec rspec --exclude-pattern "spec/load_spec.rb" --format documentation | ||
bundle exec rspec spec/load_spec.rb --format documentation |
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