Skip to content

proposals: confirmation for guideline agreements #160

proposals: confirmation for guideline agreements

proposals: confirmation for guideline agreements #160

name: StandadrdRb y RSpec
on:
push:
branches:
- main
- staging
pull_request:
branches:
- main
jobs:
standardrb:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: bin/standardrb --config .standard.yml
rspec:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16.13.0
- name: Find yarn cache location
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: JS package cache
uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install packages
run: |
yarn install --pure-lockfile
- name: Setup test database
env:
MAILER_SENDER: "[email protected]"
DATABASE_URL: postgres://postgres:password@localhost:5432/decidim_monterrey_test
RAILS_ENV: test
run: |
bin/rails db:test:prepare
- name: Run tests
env:
MAILER_SENDER: "[email protected]"
DATABASE_URL: postgres://postgres:password@localhost:5432/decidim_monterrey_test
RAILS_ENV: test
run: bin/rspec