Skip to content

Merge pull request #104 from kaboom-db/dependabot/npm_and_yarn/eslint… #543

Merge pull request #104 from kaboom-db/dependabot/npm_and_yarn/eslint…

Merge pull request #104 from kaboom-db/dependabot/npm_and_yarn/eslint… #543

Workflow file for this run

name: "Ruby on Rails CI"
on:
push:
branches: "**"
pull_request:
branches: "**"
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: kaboom_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/kaboom_test"
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Precompile assets
run: bin/rails assets:precompile
- name: Run tests
run: bundle exec rspec
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Install Yarn packages
run: yarn
- name: Lint Ruby using Standard
run: bundle exec standardrb
- name: Lint Javscript/Typescript using eslint
run: yarn lint:js