From 47f364414bb3950f004db4dc77689009fe6dc3a5 Mon Sep 17 00:00:00 2001 From: Magdalena Kinney <71239578+magkinney@users.noreply.github.com> Date: Tue, 5 Sep 2023 08:12:58 -0700 Subject: [PATCH] Added github workflow. (#3) * Added github workflow. * Added ruby version. * Updated yml. * Updated bundler version. * Updated ruby version. --- .github/workflows/salesloft.yml | 56 +++++++++++++++++++++++++++++++++ omniauth-salesloft.gemspec | 2 +- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/salesloft.yml diff --git a/.github/workflows/salesloft.yml b/.github/workflows/salesloft.yml new file mode 100644 index 0000000..71084e6 --- /dev/null +++ b/.github/workflows/salesloft.yml @@ -0,0 +1,56 @@ +name: SalesLoft +on: + push: + branches: [ master ] + tags: [ 'v*' ] + pull_request: + +jobs: + rspec: + name: RSpec + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: [ 2.7, 3.0, 3.2] + + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + # runs 'bundle install' and caches installed gems automatically + bundler-cache: true + + - name: Gemfile + run: echo $BUNDLE_GEMFILE + + - name: Ruby Version + run: ruby --version + + - name: Run Tests + run: bundle exec rspec + + rspecall: + if: ${{ always() }} + runs-on: ubuntu-latest + name: RSpec (matrix) + needs: [rspec] + steps: + - name: Check status of all RSpec runs + if: ${{ needs.rspec.result != 'success' }} + run: exit 1 + publish: + name: Publish Gem + needs: rspec + if: startsWith(github.ref, 'refs/tags/v') + runs-on: ubuntu-latest + steps: + - name: Clone Repo + uses: actions/checkout@v2 + + - name: Publish Gem + uses: SalesLoft/publish-gem-action@v1.0.0 + with: + gem_repo_url: ${{ secrets.GEM_REPO_UPLOAD_URL }} diff --git a/omniauth-salesloft.gemspec b/omniauth-salesloft.gemspec index 2e7bd2c..c78d960 100644 --- a/omniauth-salesloft.gemspec +++ b/omniauth-salesloft.gemspec @@ -21,7 +21,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency 'omniauth', '>= 1.1.1' spec.add_runtime_dependency 'omniauth-oauth2', '>= 1.3.1' - spec.add_development_dependency "bundler", "~> 1.5" + spec.add_development_dependency "bundler", '~> 2.4', '>= 2.4.10' spec.add_development_dependency 'rspec', '~> 3.2', '>= 3.2.0' spec.add_development_dependency "rake" end