Skip to content

Use appraisal to run specs #52

Use appraisal to run specs

Use appraisal to run specs #52

Workflow file for this run

name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
# ruby-version: ['2.7', '3.0', '3.1', '3.2']
gemfile:
# - rails_4.gemfile
# - rails_5.gemfile
- rails_6.gemfile
rubygems:
- default
ruby:
# - '2.7'
- '3.2'
# bundler:
# - default
exclude:
- gemfile: rails_4.gemfile
ruby: '3.2'
- gemfile: rails_6.gemfile
ruby: '2.7'
name: ${{ matrix.gemfile }}, Ruby ${{ matrix.ruby }}
steps:
- uses: actions/checkout@v4
- name: Set up Ruby and Bundle
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
rubygems: ${{ matrix.rubygems }}
# bundler: ${{ matrix.bundler }}
bundler-cache: true
- name: Export ENV
run: cat configs/default.env >> $GITHUB_ENV
- name: Tests
run: 'bundle exec appraisal rails-6 bundle exec rspec -t ~type:integration --force-color --format doc'
release:
needs: test
if: startsWith(github.ref, 'refs/tags/v') || startsWith(github.ref, 'refs/tags/build-')
runs-on: ubuntu-latest
env:
GEMS_PATH: "pkg/*.gem"
RUBYGEMS_HOST: "${{ secrets.RUBYGEMS_HOST }}"
JFROG_USER: "${{ secrets.JFROG_USER }}"
JFROG_PASS: "${{ secrets.JFROG_PASS }}"
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Clear any existing packages
run: rm -f $GEMS_PATH
- name: Retrieve credentials
run: |
mkdir -p $HOME/.gem
curl -u $JFROG_USER:$JFROG_PASS $RUBYGEMS_HOST/api/v1/api_key.yaml > $HOME/.gem/credentials
chmod 600 $HOME/.gem/credentials
- name: Build gem
run: bundle exec rake build zuora.gemspec
- name: Publish
run: gem push $GEMS_PATH