Skip to content

Hotfix / Improve feed performance #7

Hotfix / Improve feed performance

Hotfix / Improve feed performance #7

name: Code Analysis
on: pull_request
jobs:
linter:
runs-on: ubuntu-latest
permissions:
pull-requests: write
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v2
- run: |
git fetch --no-tags --prune origin +refs/heads/*:refs/remotes/origin/*
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.1'
- name: Setup pronto
run: gem install 'pronto:0.11.0' 'rubocop:1.27.0' 'pronto-rubocop:0.11.1' 'rubocop-rails:2.14.2' 'rubocop-gitlab-security:0.1.1' pronto-brakeman pronto-fasterer pronto-flay --conservative
- name: Run Pronto
run: pronto run -f github_status github_pr -c origin/${{ github.base_ref }}
env:
PRONTO_PULL_REQUEST_ID: ${{ github.event.pull_request.number }}
PRONTO_GITHUB_ACCESS_TOKEN: ${{ github.token }}
tests:
runs-on: ubuntu-latest
env:
RAILS_ENV: test
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0.1'
- name: Bundle install
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Setup database
run: |
cp config/_sample_database.yml config/database.yml
rails db:create db:schema:load
- name: Run tests
run: bundle exec rspec