hauleth

hauleth

Some time ago GitHub announced Actions (still in beta, but with public access) that is like built-in CI service with great integration into rest of GitHub. This allows developers to define their own actions to be reused by others and publish them on Marketplace.

So I created new action that allows to run automatic Credo reviews by utilising great Reviewdog tool.

Usage is pretty simple. If you have Workflows enabled you just create new file named .github/workflows/lint.yml that contains:

name: Lints CI

on: [pull_request]

jobs:
  credo:
    runs-on: ubuntu-latest
    container:
      image: elixir:1.9.1-slim
    steps:
    - uses: actions/checkout@v1
    - name: Install Dependencies
      run: |
        mix local.rebar --force
        mix local.hex --force
        mix deps.get
    - name: Run Credo
      uses: hauleth/reviewdog-action-credo@v1
      with:
        github_token: ${{ secrets.github_token }}

And as the result you will get report with style violations.

Showing Posts 1 to 5

OvermindDL1

OvermindDL1

Ooo very nice!

hauleth

hauleth OP

Also crated one for Erlang code and Elvis linter.

https://github.com/hauleth/reviewdog-action-elvis

hauleth

hauleth OP

I have created GH Organisation to group all repositories that are meant for operations that manage BEAM projects.

ijunaidfarooq

ijunaidfarooq

Do this comment on GH Pull request? same as Hound?

what violation and on which file it happened?

ijunaidfarooq

ijunaidfarooq

Hi, this is what I did.

1: Added a file in .github/workflows/ci.yml

name: Code Quality and Ex Unit Tests

on: [pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-elixir@v1
      with:
        otp-version: '23.0'
        elixir-version: '1.11.1'
    - name: Install Dependencies
      run: |
        mix local.rebar --force
        mix local.hex --force
        mix deps.get
    - name: credo
      uses: red-shirts/reviewdog-action-credo@v1
      with:
        github_token: ${{ secrets.ghactions }}
        reporter: github-pr-review

it gave me this error.


Run red-shirts/reviewdog-action-credo@v1
  with:
    github_token: ***
    reporter: github-pr-review
    level: error
/usr/bin/docker run --name 7fe9c421da50be8a228f67077_4634b0 --label 179394 --workdir /github/workspace --rm -e INPUT_GITHUB_TOKEN -e INPUT_REPORTER -e INPUT_LEVEL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/evercam-server2/evercam-server2":"/github/workspace" 179394:2906b797fe9c421da50be8a228f67077  "***" "error" "github-pr-review"
** (Mix) Could not find an SCM for dependency :bcrypt_elixir from EvercamMedia.Mixfile
— All posts loaded —

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 92995 915
New
AstonJ
The obligatory hello world thread! Who are you and where are you from? :stuck_out_tongue:
4616 55835 594
New
caslu
I want to open this thread for you all to discuss and help those who really like Ash but are still hesitant to use it in a real project. ...
New
arcanemachine
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
alexslade
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog It says that Fly is going all-in on sprites, which is a worry ...
New
Herve37
We’re evaluating API mocking tools for OpenAPI-based projects and would love to hear what other teams are using. We’re particularly inte...
New
matt-savvy
Is there a word for the ~> symbol used in Version strings? Do you also just call it a Squiggle Arrow™ ?!
New

Other Trending Topics Top

garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
wintermeyer
There are three potential reasons for members of this forum to have a look at https://vutuv.de You are tired or annoyed of LinkedIn. Yo...
New
aseigo
ICal is a library for interacting with iCalendar data. It parses iCalendars into typed Elixir structs via ICal.from_ics, and can prepare ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews