Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Github actions workflow #537

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 42 additions & 18 deletions .github/workflows/ruby-ci.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,54 @@
name: RubyCI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
types: [opened, synchronize, reopened, ready_for_review]

env:
# Add secret key to Repository secrets
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
DATABASE_URL: postgres://postgres:postgres@localhost:5432/test
REDIS_URL: redis://localhost:6379/0

jobs:
rubocop:
name: Rubocop
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run Rubocop
run: |
bundle exec rubocop

security:
name: Security
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run brakeman
run: |
bundle exec brakeman -w3
- name: Run bundler-audit
run: |
bundle exec bundle-audit check --update

tests:
name: Tests
env:
Expand Down Expand Up @@ -59,20 +98,5 @@ jobs:
bin/yarn install --ignore-engines
- name: Run tests
run: |
bundle exec rspec --fail-fast -exclude-pattern ./spec/system/admin_organization_system_spec.rb

security:
name: Security
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
bundle exec rspec --fail-fast

- name: Setup Ruby and install gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Run security checks
run: |
bundle exec brakeman -w3 -o tmp/brakeman.html
Loading