summaryrefslogtreecommitdiff
path: root/.github/workflows/test.yml
diff options
context:
space:
mode:
authordblock <dblock@dblock.org>2022-03-25 09:54:00 -0400
committerdblock <dblock@dblock.org>2022-03-25 10:03:09 -0400
commit7a9c4a7d41fc57d7b323b5556988e5d2b482af28 (patch)
tree3c40249be862aae1cf54a742048fc3a567f741d8 /.github/workflows/test.yml
parent43b476a34265648d86339874e6d41234fa015e06 (diff)
downloadhashie-7a9c4a7d41fc57d7b323b5556988e5d2b482af28.tar.gz
Move danger into its own workflow file.
Diffstat (limited to '.github/workflows/test.yml')
-rw-r--r--.github/workflows/test.yml72
1 files changed, 72 insertions, 0 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
new file mode 100644
index 0000000..b3f478f
--- /dev/null
+++ b/.github/workflows/test.yml
@@ -0,0 +1,72 @@
+name: CI
+on: [push, pull_request]
+
+jobs:
+ integration-test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: 2.7
+ - name: Run integration tests
+ run: |
+ for dir in spec/integration/*; do
+ echo "testing $dir integration"
+ BUNDLE_GEMFILE=$dir/Gemfile bundle install --jobs 4 --retry 3
+ BUNDLE_GEMFILE=$dir/Gemfile bundle exec rspec $dir
+ done
+
+ test:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ruby:
+ - '3.1'
+ - '3.0'
+ - '2.7'
+ - '2.6'
+ - '2.5'
+ - '2.4'
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: ${{ matrix.ruby }}
+ - name: Install dependencies
+ run: bundle install --jobs 4 --retry 3
+ - name: Run tests
+ env:
+ RUBYOPT: "--disable-error_highlight"
+ run: bundle exec rake
+
+ test-jruby:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ os:
+ - macos
+ - ubuntu
+ jruby:
+ - jruby
+ steps:
+ - uses: actions/checkout@v2
+ - name: Set up Ruby
+ uses: ruby/setup-ruby@v1
+ with:
+ bundler-cache: true
+ ruby-version: ${{ matrix.jruby }}
+ - name: Install dependencies
+ env:
+ JRUBY_OPTS: --debug
+ run: bundle install --jobs 4 --retry 3
+ - name: Run tests
+ env:
+ JRUBY_OPTS: --debug
+ run: bundle exec rake