Sunday, May 5, 2024
HomeRuby On RailsGitHub Actions | Drifting Ruby

GitHub Actions | Drifting Ruby


.github/workflows/important.yml
identify: CI

on:
  push:
    branches: [ master, develop ]
  pull_request:
    branches: [ master, develop ]

jobs:
  check:
    # providers:
    #   db:
    #     picture: postgres:11
    #     ports: ['5432:5432']
    runs-on: ubuntu-latest

    steps:
      - makes use of: actions/[email protected]
      - identify: Setup Ruby
        makes use of: ruby/[email protected]
        with:
          ruby-version: 2.7.1

      - makes use of: Borales/[email protected]
        with:
          cmd: set up

      - identify: Set up Dependencies
        run: |
          # sudo apt set up -yqq libpq-dev
          gem set up bundler

      - identify: Set up Gems
        run: |
          bundle set up

      - identify: Put together Database
        run: |
          bundle exec rails db:put together

      - identify: Run Assessments
        # env:
        #   DATABASE_URL: postgres://postgres:@localhost:5432/databasename
        #   RAILS_MASTER_KEY: ${{secrets and techniques.RAILS_MASTER_KEY}}
        run: |
          bundle exec rails check

      - identify: Create Protection Artifact
        makes use of: actions/[email protected]
        with:
          identify: code-coverage
          path: protection/

  safety:
    runs-on: ubuntu-latest
    steps:
      - makes use of: actions/[email protected]

      - identify: Setup Ruby
        makes use of: ruby/[email protected]
        with:
          ruby-version: 2.7.1

      - identify: Set up Brakeman
        run: |
          gem set up brakeman

      - identify: Run Brakeman
        run: |
          brakeman -f json > tmp/brakeman.json || exit 0

      - identify: Brakeman Report
        makes use of: devmasx/[email protected]
        env:
          REPORT_PATH: tmp/brakeman.json
          GITHUB_TOKEN: ${{secrets and techniques.GITHUB_TOKEN}}
RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments