Updating-nodejs #2899
Workflow file for this run
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: Lint the codebase | |
# Run this workflow every time a new commit pushed to your repository | |
on: pull_request | |
jobs: | |
# Set the job key. The key is displayed as the job name | |
# when a job name is not provided | |
run-tests: | |
# Name the Job | |
name: Lint the codebase | |
# Set the type of machine to run on (ansible-lint now needs newer Ubuntu) | |
runs-on: ubuntu-latest | |
steps: | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- name: Checkout code | |
if: ${{ github.event.pull_request.head.ref != 'documentation' }} | |
uses: actions/checkout@v2 | |
# Linter checks. | |
- name: Prepare linters. | |
if: ${{ github.event.pull_request.head.ref != 'documentation' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip yamllint shellcheck | |
pip3 install ansible ansible-lint | |
- name: Run linters. | |
if: ${{ github.event.pull_request.head.ref != 'documentation' }} | |
run: | | |
ansible-lint ./roles | |
yamllint ./roles | |
cd scripts && shellcheck *.sh |