Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/julianrubisch/attractor-action
A Github action to run an Attractor report on your project
https://github.com/julianrubisch/attractor-action
code-quality github-action javascript rails react ruby vue
Last synced: 7 days ago
JSON representation
A Github action to run an Attractor report on your project
- Host: GitHub
- URL: https://github.com/julianrubisch/attractor-action
- Owner: julianrubisch
- License: mit
- Created: 2019-12-14T12:10:11.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-20T11:16:15.000Z (about 5 years ago)
- Last Synced: 2024-12-12T14:34:23.022Z (15 days ago)
- Topics: code-quality, github-action, javascript, rails, react, ruby, vue
- Language: Shell
- Homepage:
- Size: 39.1 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Attractor Action
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
A Github action to run an [Attractor](https://github.com/julianrubisch/attractor) report on your project.
## Table of Contents
* [Usage](#usage)
* [Example Workflow](#example-workflow)
* [Inputs](#inputs)
* [License](#license)
* [Contributors](#contributors)## Usage
Add the following to your GitHub action workflow to use Attractor Action:```yml
- name: Run Attractor
uses: julianrubisch/attractor-action@master
with:
version: 'latest'
bundle: 'false'
(file_prefix: 'app/models') - OPTIONAL
(javascript: '(true|false)') - OPTIONAL
```## Example Workflow
The workflow below simply saves the `attractor_output` directory to a build artifact.
```yml
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0' # IMPORTANT!
- name: Run Attractor
uses: julianrubisch/attractor-action@master
with:
version: 'latest'
bundle: 'false'
(file_prefix: 'app/models') # OPTIONAL
(javascript: '(true|false)') # OPTIONAL
- name: Upload Artifact
uses: actions/upload-artifact@v1
if: success()
with:
name: attractor
path: attractor_output
```Alternatively, you could upload it to an AWS bucket, deploy it on Netlify,... you name it! PRs documenting usage are very welcome!
It's **compulsory** to set the `fetch-depth` attribute on the checkout action to `0`, otherwise only the `HEAD` commit will be fetched, rendering the `churn` output useless (we need the full history).
## Inputs
| **Input Parm Name** | **Required** | **Default Value** | **Description** | **Examples of Equivalent Local Commands** |
| ------------------- | ------------ | ----------------- | ----------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------- |
| bundle | false | false | If you would like to run `bundle install` on your project instead of `gem install` | `bundle install --deployment --jobs 4 --retry 3` |
| version | false | latest GA | Define a different version of attractor | `gem install attractor -v 1.0.0` |
| file_prefix | false | '' | Specify a director (defaults to app root) | `attractor report --file-prefix app/models` |
| javascript | false | false | Set this to true if you would like to check javascript | `attractor report -t js` |## License
MIT
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!