Skip to content

Commit

Permalink
Merge pull request #91 from sue445/github_actions
Browse files Browse the repository at this point in the history
Migrate to GitHub Actions
  • Loading branch information
sue445 committed Jan 23, 2023
2 parents 8f6d33e + fd4c7ad commit 5c9a2e3
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 94 deletions.
93 changes: 0 additions & 93 deletions .circleci/config.yml

This file was deleted.

91 changes: 91 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: test

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened
schedule:
- cron: "0 10 * * 5" # JST 19:00 (Fri)

jobs:
test:
runs-on: ubuntu-latest

strategy:
fail-fast: false

matrix:
ruby:
- "2.5"
- "2.6"
- "2.7"
- "3.0"
- "3.1"
- "3.2"

steps:
- uses: actions/checkout@v3

- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: bundle update
run: |
set -xe
bundle config path vendor/bundle
bundle update --jobs $(nproc) --retry 3
- name: Setup Code Climate Test Reporter
uses: aktions/codeclimate-test-reporter@v1
with:
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
command: before-build
continue-on-error: true

- run: bundle exec rspec

- name: Teardown Code Climate Test Reporter
uses: aktions/codeclimate-test-reporter@v1
with:
codeclimate-test-reporter-id: ${{ secrets.CC_TEST_REPORTER_ID }}
command: after-build
if: always()
continue-on-error: true

- run: bundle exec rubocop

- name: Slack Notification (not success)
uses: lazy-actions/slatify@master
if: "! success()"
continue-on-error: true
with:
job_name: ${{ format('*build* ({0})', matrix.ruby) }}
type: ${{ job.status }}
icon_emoji: ":octocat:"
url: ${{ secrets.SLACK_WEBHOOK }}
token: ${{ secrets.GITHUB_TOKEN }}

notify:
needs:
- test

runs-on: ubuntu-latest

steps:
- name: Slack Notification (success)
uses: lazy-actions/slatify@master
if: always()
continue-on-error: true
with:
job_name: '*build*'
type: ${{ job.status }}
icon_emoji: ":octocat:"
url: ${{ secrets.SLACK_WEBHOOK }}
token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
5ch (a.k.a. 2ch) reader via http://itest.5ch.net/

[![Gem Version](https://badge.fury.io/rb/itest5ch.svg)](https://badge.fury.io/rb/itest5ch)
[![CircleCI](https://circleci.com/gh/sue445/itest5ch/tree/master.svg?style=svg)](https://circleci.com/gh/sue445/itest5ch/tree/master)
[![test](https://github.com/sue445/itest5ch/actions/workflows/test.yml/badge.svg)](https://github.com/sue445/itest5ch/actions/workflows/test.yml)
[![Coverage Status](https://coveralls.io/repos/github/sue445/itest5ch/badge.svg)](https://coveralls.io/github/sue445/itest5ch)
[![Maintainability](https://api.codeclimate.com/v1/badges/14a81b3f7da11e475242/maintainability)](https://codeclimate.com/github/sue445/itest5ch/maintainability)

Expand Down

0 comments on commit 5c9a2e3

Please sign in to comment.