marocchino / ruby-check-action

Run ruby -wc in github action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

typescript-action status

Ruby Check Action

Run ruby -wc and anotate it with Problem Matchers This action is useful when you want to detect syntax errors of test skipped files in CI.

Usage

basic

name: test

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
      - uses: marocchino/ruby-check-action@v1

report error only

name: test

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
      - uses: marocchino/ruby-check-action@v1
        with:
          switch: '-c'

smaller scope of paths

name: test

on:
  pull_request:
  push:
    branches:
      - main

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: ruby/setup-ruby@v1
        with:
          ruby-version: 2.6
      - uses: marocchino/ruby-check-action@v1
        with:
          paths: |
            lib/**/*.rb
            db/**/*.rb
            config/**/*.rb

Inputs

switch

Optional, Switch that pass to ruby. This defaults to -wc.

paths

Optional, Filters the path of ruby files. If value need to be more than one line, it should be multiline string not an array. This defaults to **/*.rb.

GITHUB_TOKEN

Optional, You can set PAT here. If not set, this will use ${{ github.token }}.

Outputs

None

Any problem?

Feel free to report issues. 😃

About

Run ruby -wc in github action

License:MIT License


Languages

Language:TypeScript 86.6%Language:JavaScript 13.4%