-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from rootstrap/fix-ci
Replace TravisCI to Github Actions
- Loading branch information
Showing
3 changed files
with
62 additions
and
32 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,55 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
branches: ["master", "main"] | ||
|
||
push: | ||
branches: ["master", "main"] | ||
|
||
jobs: | ||
linters: | ||
runs-on: ubuntu-latest | ||
name: linter/ruby | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: 2.6 | ||
bundler-cache: true | ||
|
||
- name: Run linters | ||
run: bundle exec rake code_analysis | ||
test: | ||
runs-on: ubuntu-latest | ||
container: ${{ matrix.ruby }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- ruby: ruby:2.5 | ||
- ruby: ruby:2.6 | ||
- ruby: ruby:2.7 | ||
- ruby: ruby:3.0 | ||
coverage: true | ||
name: test/ruby ${{ matrix.ruby }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Bundle install | ||
run: bundle install -j$(nproc) --retry 3 | ||
- name: Run tests | ||
run: bundle exec rspec | ||
timeout-minutes: 1 | ||
- name: Test & publish code coverage | ||
uses: paambaati/[email protected] | ||
if: matrix.coverage && github.ref == 'refs/heads/master' | ||
env: | ||
CC_TEST_REPORTER_ID: cb01575b98b3b80848a3bc292ca6145860871470e5d0669453030d36578f9115 | ||
with: | ||
coverageCommand: bundle exec rspec | ||
coverageLocations: ${{ github.workspace }}/coverage/coverage.json:simplecov | ||
debug: true |
This file was deleted.
Oops, something went wrong.
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