Skip to content

Bump turbo-rails from 2.0.3 to 2.0.4 #236

Bump turbo-rails from 2.0.3 to 2.0.4

Bump turbo-rails from 2.0.3 to 2.0.4 #236

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: "Test and Lint"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: knewhub_test
POSTGRES_USER: rails
POSTGRES_PASSWORD: password
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
env:
RAILS_ENV: test
DATABASE_URL: "postgres://rails:password@localhost:5432/knewhub_test"
RAILS_MASTER_KEY: ${{ secrets.TEST_ENV_RAILS_MASTER_KEY }}
CC_TEST_REPORTER_ID: bdccd2be8fc60a7e4cb2ea7ba07933e73453e6171f6f6a20938fb06735aeb9dd
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Set up database schema
run: bin/rails db:schema:load
- name: Build Sass files
run: bundle exec rails dartsass:build
- name: Setup Code Climate test coverage reporter
run: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
- name: Run tests
run: bundle exec rspec --order random
- name: Publish test coverage
run: ./cc-test-reporter after-build --exit-code $?
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Ruby and gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Security audit dependencies
run: bundle exec bundle-audit check --update
- name: Security audit application code
run: bundle exec brakeman -q -w2
- name: Lint Ruby files
run: bundle exec rubocop