mirror of
https://github.com/truenas/scale-build.git
synced 2026-05-08 17:20:21 +01:00
Add flake8 checker
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
name: flake8
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python 3.9
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: 3.9
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install flake8
|
||||
- name: Analysing the code with flake8
|
||||
run: flake8 .
|
||||
@@ -7,7 +7,7 @@ COMMIT_HASH=$(shell git rev-parse --short HEAD)
|
||||
check:
|
||||
ifeq ("$(wildcard ./venv-${COMMIT_HASH})","")
|
||||
@rm -rf venv-*
|
||||
@apt install -y python3-distutils python3-pip python3-venv >/dev/null 2>&1
|
||||
@${PYTHON} -m pip install -U virtualenv >/dev/null 2>&1
|
||||
@${PYTHON} -m venv venv-${COMMIT_HASH}
|
||||
@. ./venv-${COMMIT_HASH}/bin/activate && \
|
||||
python3 -m pip install -r requirements.txt >/dev/null 2>&1 && \
|
||||
|
||||
Reference in New Issue
Block a user