2020-10-14 13:21:05 +00:00
|
|
|
###########################
|
|
|
|
###########################
|
|
|
|
## Linter GitHub Actions ##
|
|
|
|
###########################
|
|
|
|
###########################
|
2020-06-22 05:17:13 +00:00
|
|
|
|
2020-10-14 13:21:05 +00:00
|
|
|
name: Lint Code Base
|
2020-06-22 05:17:13 +00:00
|
|
|
|
2020-10-14 13:21:05 +00:00
|
|
|
#
|
|
|
|
# Documentation:
|
|
|
|
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
|
|
|
|
#
|
|
|
|
|
|
|
|
#############################
|
|
|
|
# Start the job on all push #
|
|
|
|
#############################
|
2020-06-22 05:17:13 +00:00
|
|
|
on:
|
|
|
|
push:
|
2020-10-14 13:21:05 +00:00
|
|
|
branches: [master]
|
2020-06-22 05:17:13 +00:00
|
|
|
pull_request:
|
2020-10-14 13:21:05 +00:00
|
|
|
branches-ignore: [master]
|
|
|
|
|
2020-06-22 05:17:13 +00:00
|
|
|
|
2020-10-14 13:21:05 +00:00
|
|
|
###############
|
|
|
|
# Set the Job #
|
|
|
|
###############
|
2020-06-22 05:17:13 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
2020-10-14 13:21:05 +00:00
|
|
|
name: Lint Code Base
|
|
|
|
# Set the agent to run on
|
2020-06-22 05:17:13 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
2020-10-14 13:21:05 +00:00
|
|
|
##################
|
|
|
|
# Load all steps #
|
|
|
|
###################
|
2020-06-22 05:17:13 +00:00
|
|
|
steps:
|
2020-10-14 13:21:05 +00:00
|
|
|
##########################
|
|
|
|
# Checkout the code base #
|
|
|
|
##########################
|
|
|
|
- name: Checkout Code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
# Full git history is needed to get a proper list of changed files within `super-linter`
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2020-06-22 05:17:13 +00:00
|
|
|
- name: Set up Python
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: '3.x'
|
|
|
|
|
2020-10-14 13:21:05 +00:00
|
|
|
- name: Install Required packages
|
2020-06-22 05:17:13 +00:00
|
|
|
run: |
|
2020-10-14 13:21:05 +00:00
|
|
|
sudo apt-get install -y libvirt-dev python3-lxml zlib1g-dev libxslt1-dev
|
2020-06-22 05:17:13 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python3 -m pip install --upgrade pip
|
2020-09-25 11:11:03 +00:00
|
|
|
if [ -f dev/requirements.txt ]; then pip3 install -r dev/requirements.txt; else pip3 install -r conf/requirements.txt; fi
|
|
|
|
################################
|
|
|
|
# Run Linter against code base #
|
|
|
|
################################
|
|
|
|
- name: Lint Code Base
|
|
|
|
uses: docker://github/super-linter:latest
|
2020-06-22 05:17:13 +00:00
|
|
|
env:
|
2020-09-25 11:11:03 +00:00
|
|
|
DEFAULT_BRANCH: master
|
2020-10-14 13:21:05 +00:00
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
2020-06-22 05:17:13 +00:00
|
|
|
VALIDATE_ANSIBLE: false
|
2020-06-26 13:53:37 +00:00
|
|
|
VALIDATE_CLOJURE: false
|
|
|
|
VALIDATE_COFFEE: false
|
2020-07-20 07:17:35 +00:00
|
|
|
VALIDATE_DART: false
|
2020-06-26 13:53:37 +00:00
|
|
|
VALIDATE_GO: false
|
2020-07-20 07:17:35 +00:00
|
|
|
VALIDATE_JSX: false
|
2020-06-26 13:53:37 +00:00
|
|
|
VALIDATE_KOTLIN: false
|
2020-07-20 07:17:35 +00:00
|
|
|
VALIDATE_POWERSHELL: false
|
2020-06-26 13:53:37 +00:00
|
|
|
VALIDATE_PERL: false
|
|
|
|
VALIDATE_PHP: false
|
2020-07-20 07:17:35 +00:00
|
|
|
VALIDATE_RAKU: false
|
|
|
|
VALIDATE_RUBY: false
|
|
|
|
VALIDATE_TSX: false
|
2020-06-26 13:53:37 +00:00
|
|
|
VALIDATE_TERRAFORM: false
|
|
|
|
|