-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GH action to run tests & publish to Coveralls
- Loading branch information
Showing
6 changed files
with
78 additions
and
27 deletions.
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,25 @@ | ||
name: rspec-tests | ||
description: Composite action for rspec tests | ||
inputs: | ||
github-token: | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Install bundler | ||
shell: bash | ||
# The bundler version used must match the one in the repo's gemspec | ||
run: gem install bundler:2.2.19 | ||
- name: Bundle dependencies | ||
shell: bash | ||
run: bundle | ||
- name: Run rspec tests | ||
shell: bash | ||
env: | ||
CI: true | ||
run: bundle exec rspec | ||
- name: Use coveralls | ||
uses: coverallsapp/github-action@1.1.3 | ||
with: | ||
github-token: ${{ inputs.github-token }} | ||
path-to-lcov: 'coverage/lcov.info' |
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,24 @@ | ||
name: 'Test' | ||
on: | ||
push: | ||
branches: | ||
- master | ||
tags: | ||
- v* | ||
pull_request: | ||
types: [opened, reopened, edited, synchronize] | ||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
ruby_version: [2.4, 2.5, 2.6, 2.7] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '${{ matrix.ruby_version }}' | ||
- name: Run rspec tests | ||
uses: ./.github/actions/rspec_tests | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
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
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
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
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