Skip to content

Commit

Permalink
Merge pull request #15 from kimkim0814/ci-setup
Browse files Browse the repository at this point in the history
CI setup
  • Loading branch information
kimkim0814 committed Jul 24, 2024
2 parents fc9c3d5 + ea81abc commit 7afaa0b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Run rspec, rubocop

on:
push:
branches:
- main
pull_request:
jobs:
rspec:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
mysql:
image: mysql:8.0
ports:
- 3306:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true

- name: Cache node modules
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-node-
- name: Bundler and gem install
run: |
gem install bundler
bundle install --jobs 4 --retry 3 --path vendor/bundle
- name: Yarn install
run: yarn install --check-files

- name: Run rspec
run: bundle exec rspec

0 comments on commit 7afaa0b

Please sign in to comment.