Book a Car api Backend #76
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linters | |
on: pull_request | |
env: | |
FORCE_COLOR: 1 | |
jobs: | |
rubocop: | |
name: Rubocop | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-ruby@v1 | |
with: | |
ruby-version: 3.1.x | |
- name: Setup Rubocop | |
run: | | |
gem install --no-document rubocop -v '>= 1.0, < 2.0' # https://docs.rubocop.org/en/stable/installation/ | |
[ -f .rubocop.yml ] || wget https://raw.githubusercontent.com/microverseinc/linters-config/master/ror/.rubocop.yml | |
- name: Rubocop Report | |
run: rubocop --color | |
nodechecker: | |
name: node_modules checker | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Check node_modules existence | |
run: | | |
if [ -d "node_modules/" ]; then echo -e "\e[1;31mThe node_modules/ folder was pushed to the repo. Please remove it from the GitHub repository and try again."; echo -e "\e[1;32mYou can set up a .gitignore file with this folder included on it to prevent this from happening in the future." && exit 1; fi |