Skip to content

Update README

Update README #6

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: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- "5432:5432"
env:
POSTGRES_DB: rails_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/rails_test"
RAILS_SYSTEM_TESTING_SCREENSHOT_HTML: 1
steps:
- name: Checkout code
uses: actions/checkout@v3
# Add or replace dependency steps here
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Setup Chrome
uses: browser-actions/setup-chrome@latest
with:
chrome-version: stable
# Add or replace setup steps here
- name: Set up database schema
run: bin/rails db:schema:load
- name: Install js dependencies
run: npm install
- name: Build vite assets
run: bin/rails assets:precompile
# Add or replace test runners here
- name: Run rubocop rules
run: bundle exec rubocop
- name: Run basic tests
run: bin/rails test
- name: Run system tests
run: bin/rails test:system
- name: Save artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: system-test-screenshots
include-hidden-files: true
path: |
tmp/screenshots
public/vite-dev
retention-days: 5