-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added github workflow. * Added ruby version. * Updated yml. * Updated bundler version. * Updated ruby version.
- Loading branch information
Showing
2 changed files
with
57 additions
and
1 deletion.
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,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 }} |
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