Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace TravisCI to Github Actions #34

Merged
merged 7 commits into from
Mar 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Replace TravisCI to Actions'
  • Loading branch information
blacksam07 committed Feb 13, 2024
commit 125a3efad0d97e51e462ff5528f4f5b5b517fefa
25 changes: 25 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Linter

on:
pull_request:
branches: ["master", "main"]

push:
branches: ["master", "main"]

jobs:
linter:
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 linter
run: bundle exec rake code_analysis
44 changes: 44 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Test

on:
pull_request:
branches: ["master", "main"]

push:
branches: ["master", "main"]

jobs:
test:
runs-on: ubuntu-latest
container: ${{ matrix.ruby }}
env:
CC_TEST_REPORTER_ID: cb01575b98b3b80848a3bc292ca6145860871470e5d0669453030d36578f9115
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: Setup Code Climate test-reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
if: matrix.coverage
- name: Bundle install
run: bundle install -j$(nproc) --retry 3
- name: Run tests
run: bundle exec rspec
timeout-minutes: 1
- name: Publish code coverage
run: |
export GIT_BRANCH="${GITHUB_REF/refs\/heads\//}"
./cc-test-reporter after-build -r ${{env.CC_TEST_REPORTER_ID}}
if: matrix.coverage
28 changes: 0 additions & 28 deletions .travis.yml

This file was deleted.

Loading