1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-10-31 19:44:16 +00:00
webvirtcloud/.github/workflows/linter.yml

89 lines
2.3 KiB
YAML
Raw Normal View History

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-16 14:55:14 +00:00
sudo apt-get install -y python3-virtualenv libvirt-dev python3-lxml zlib1g-dev libxslt1-dev
- name: Create & Activate VENV
run: |
python3 -m venv venv
source venv/bin/activate
2020-06-22 05:17:13 +00:00
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
2020-10-16 14:55:14 +00:00
pip3 install wheel
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-10-17 14:15:01 +00:00
FILTER_REGEX_EXCLUDE: .*(static|scss|venv|locale)/.*
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