Skip to content

Update babel monorepo #252

Update babel monorepo

Update babel monorepo #252

Workflow file for this run

name: Run rspec, rubocop
on: [push]
jobs:
run-rspec:
runs-on: ubuntu-latest
timeout-minutes: 10
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
matrix:
ruby-version: ['2.7.5']
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
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 }}-yarn-
- name: Cache bundle gems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gem-${{ env.cache-name }}-
${{ runner.os }}-gem-
${{ runner.os }}-
- name: Install Node.js and Yarn
run: |
sudo curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
sudo echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo curl -sL https://deb.nodesource.com/setup_14.x | sudo bash -
sudo apt update && sudo apt install -y nodejs yarn
- name: Install dependencies
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Install library for postgres
run: sudo apt install -y libpq-dev
- name: setup DB
run: |
bundle exec rails yarn:install db:setup
env:
RAILS_ENV: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
- name: Run rspec
run: bundle exec rspec
rubocop:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
ruby-version: 2.7.5
- name: Run rubocop
run: bundle exec rubocop