This repository has been archived by the owner on Jul 3, 2023. It is now read-only.
forked from marcelstoer/nodemcu-pyflasher
-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b9dd803
commit e7ea643
Showing
12 changed files
with
458 additions
and
178 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: Lint workflow | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
ci: | ||
name: ${{ matrix.name }} | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- id: flake8 | ||
name: Lint with flake8 | ||
- id: pylint | ||
name: Lint with pylint | ||
- id: black | ||
name: Check formatting with black | ||
- id: isort | ||
name: Check import order with isort | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
id: python | ||
with: | ||
python-version: '3.7' | ||
- name: Install apt dependencies | ||
run: | | ||
sudo apt install libgtk-3-dev libnotify-dev libsdl2-dev | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
- name: Restore PIP cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: pip-${{ steps.python.outputs.python-version }}-${{ hashFiles('requirements.txt', 'requirements_test.txt') }} | ||
restore-keys: | | ||
pip-${{ steps.python.outputs.python-version }}- | ||
- name: Set up Python environment | ||
run: | | ||
pip3 install -U \ | ||
-f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-18.04 \ | ||
wxPython | ||
pip3 install -r requirements.txt -r requirements_test.txt | ||
pip3 install -e . | ||
|
||
- name: Register problem matchers | ||
run: | | ||
echo "::add-matcher::.github/workflows/matchers/flake8.json" | ||
echo "::add-matcher::.github/workflows/matchers/pylint.json" | ||
echo "::add-matcher::.github/workflows/matchers/isort.json" | ||
|
||
- run: flake8 esphomeflasher | ||
if: ${{ matrix.id == 'flake8' }} | ||
- run: pylint esphomeflasher | ||
if: ${{ matrix.id == 'pylint' }} | ||
- run: black --check --diff --color esphomeflasher | ||
if: ${{ matrix.id == 'black' }} | ||
- run: isort --check --diff esphomeflasher | ||
if: ${{ matrix.id == 'isort' }} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "flake8-error", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s([EF]\\d{3}\\s.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "flake8-warning", | ||
"severity": "warning", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.*):(\\d+):(\\d+):\\s([CDNW]\\d{3}\\s.*)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4 | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "isort", | ||
"pattern": [ | ||
{ | ||
"regexp": "^ERROR:\\s+(.+)\\s+(.+)$", | ||
"file": 1, | ||
"message": 2 | ||
} | ||
] | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "pylint-error", | ||
"severity": "error", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([EF]\\d{4}):\\s.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
}, | ||
{ | ||
"owner": "pylint-warning", | ||
"severity": "warning", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(.+):(\\d+):(\\d+):\\s(([CRW]\\d{4}):\\s.+)$", | ||
"file": 1, | ||
"line": 2, | ||
"column": 3, | ||
"message": 4, | ||
"code": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.