Skip to content

Commit

Permalink
Added github workflow. (#3)
Browse files Browse the repository at this point in the history
* Added github workflow.

* Added ruby version.

* Updated yml.

* Updated bundler version.

* Updated ruby version.
  • Loading branch information
magkinney authored Sep 5, 2023
1 parent c709ef2 commit 47f3644
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
56 changes: 56 additions & 0 deletions .github/workflows/salesloft.yml
Original file line number Diff line number Diff line change
@@ -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 }}
2 changes: 1 addition & 1 deletion omniauth-salesloft.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 47f3644

Please sign in to comment.