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

Circle CIからGitHub Actionsへ移行する #92

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on: [push]

jobs:
build:
runs-on: ubuntu-latest

container:
image: circleci/ruby:2.7.1-node-browsers
env:
PGHOST: postgres
PGUSER: test

services:
postgres:
image: circleci/postgres:9.4
env:
POSTGRES_USER: test

steps:
- name: Setup file system permissions
run: sudo chmod -R 777 $GITHUB_WORKSPACE /github /__w/_temp

- uses: actions/checkout@v2

- name: Cache bundler
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-

- name: Bundle install
run: bundle install --jobs=4 --retry=3 --path vendor/bundle

- name: Database setup
run: |
bin/rails db:create
bin/rails db:schema:load

- name: Run RuboCop
run : bundle exec rubocop

- name: Run test
run: |
bundle exec rspec --format progress --format RspecJunitFormatter