Skip to content

use compressed assets #68

use compressed assets

use compressed assets #68

Workflow file for this run

# This workflow uses actions that are not certified by GitHub. They are
# provided by a third-party and are governed by separate terms of service,
# privacy policy, and support documentation.
#
# This workflow will install a prebuilt Ruby version, install dependencies, and
# run tests and linters.
name: Linting & Testing
on:
pull_request:
branches: ["master"]
jobs:
lint-n-test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports: ["5432:5432"]
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setting up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Node
uses: actions/setup-node@v3
- name: Install dependencies
run: |
sudo apt-get install -y -qq libvips
yarn install --frozen-lockfile
- name: Installing Bundler & Gems
run: |
gem install bundler
bundle install --jobs 4 --retry 3
- name: Find linting errors
run: bundle exec erblint -l
- name: Find rubocop errors
run: bundle exec rubocop
- name: Precompile assets
run: yarn run build
- name: Running Tests
env:
DATABASE_URL: postgres://postgres:password@localhost:5432/test
RAILS_ENV: test
PG_USER: postgres
run: |
bundle exec rails db:create
bundle exec rails db:migrate
bundle exec rspec