Skip to content

Style Lesson, Unit, and Material PDF and Google Doc exports #264

Style Lesson, Unit, and Material PDF and Google Doc exports

Style Lesson, Unit, and Material PDF and Google Doc exports #264

Workflow file for this run

name: CI
on:
push: {}
jobs:
scan_ruby:
if: ${{ false }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Scan for common Rails security vulnerabilities using static analysis
run: bin/brakeman --no-pager
- name: Scan for known security vulnerabilities in gems used
run: bin/bundler-audit
lint:
runs-on: ubuntu-latest
env:
RUBOCOP_CACHE_ROOT: tmp/rubocop
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run overcommit
env:
GIT_AUTHOR_EMAIL: ci@test.com
GIT_AUTHOR_NAME: 'ci user'
run: |
bundle exec overcommit --sign
bundle exec overcommit --run
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: lcms_test
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
RAILS_ENV: test
POSTGRESQL_ADDRESS: localhost
POSTGRESQL_PORT: 5432
POSTGRESQL_USERNAME: postgres
POSTGRESQL_PASSWORD: postgres
POSTGRESQL_DATABASE: lcms
REDIS_URL: redis://localhost:6379/0
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version-file: '.node-version'
cache: 'yarn'
- name: Install Yarn dependencies
run: yarn install --frozen-lockfile
- name: Build assets
run: |
yarn build
yarn build:css
- name: Setup database
run: |
bundle exec rails db:create
bundle exec rails db:schema:load
- name: Run RSpec tests
run: bundle exec rspec