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

enhance CI #9

Merged
merged 5 commits into from
Oct 4, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/bundle-update-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: bundle-update-pr

on:
push:
schedule:
- cron: "00 10 * * 5" # JST 19:00 (Fri)

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: v2.6.x

- name: Install dependencies
run: |
set -x
gem install -N bundler circleci-bundle-update-pr

- name: Set timezone to Asia/Tokyo
run: |
set -x
cp /usr/share/zoneinfo/Asia/Tokyo /etc/localtime

- name: run circleci-bundle-update-pr
run: |
set -x

export CIRCLE_BRANCH=$(echo $GITHUB_BRANCH | sed -e 's!refs/heads/!!g')
export CIRCLE_PROJECT_USERNAME=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 1)
export CIRCLE_PROJECT_REPONAME=$(echo $GITHUB_REPOSITORY | cut -d "/" -f 2)

git checkout -b $CIRCLE_BRANCH

circleci-bundle-update-pr "${GIT_USER_NAME}" "${GIT_USER_EMAIL}"
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_BRANCH: ${{ github.ref }}
GITHUB_REPOSITORY: ${{ github.repository }}
GIT_USER_NAME: "masa21kik"
GIT_USER_EMAIL: "masa21kik@gmail.com"
30 changes: 28 additions & 2 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,40 @@ jobs:

runs-on: ubuntu-latest

strategy:
matrix:
ruby:
- 2.3.x
- 2.4.x
- 2.5.x
- 2.6.x

steps:
- uses: actions/checkout@v1
- name: Set up Ruby 2.6
- name: Set up Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: 2.6.x
ruby-version: ${{ matrix.ruby }}
- name: Build and test with Rake
run: |
gem install bundler
bundle install --jobs 4 --retry 3
bundle exec rake
env:
CI: true

notify:
needs: build
runs-on: ubuntu-latest

steps:
- name: Slack Notification
uses: homoluctus/slatify@master
if: always()
with:
type: ${{ job.status }}
job_name: '*build*'
mention: 'here'
mention_if: 'failure'
icon_emoji: ":octocat:"
url: ${{ secrets.SLACK_WEBHOOK }}
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.