Skip to content

fix: fix platform error on workflow #4

fix: fix platform error on workflow

fix: fix platform error on workflow #4

Workflow file for this run

name: "Ruby on Rails CI"
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:11-alpine
ports:
- "5432:5432"
env:
POSTGRES_DB: attendance_system
POSTGRES_USER: ridhotamma
POSTGRES_PASSWORD: secret
POSTGRES_HOST_AUTH_METHOD: trust
env:
RAILS_ENV: test
DATABASE_URL: "postgres://ridhotamma:secret@localhost:5432/attendance_system"
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Add platform to bundle lock
run: bundle lock --add-platform x86_64-linux
- name: Install Ruby and gems
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
bundler-cache: true
- name: Bundle install
run: bundle install --jobs 4
- name: Set up database schema
run: bin/rails db:schema:load
- name: Run tests
run: bin/rake
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: Security audit dependencies
run: bin/bundler-audit --update
- name: Security audit application code
run: bin/brakeman -q -w2
- name: Lint Ruby files
run: bin/rubocop --parallel