forked from PyDrocsid/cogs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'poetry' into reddit-nsfw-filter
- Loading branch information
Showing
172 changed files
with
4,524 additions
and
1,499 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 |
---|---|---|
@@ -1,3 +1,4 @@ | ||
[flake8] | ||
max-line-length = 120 | ||
ignore = D,E800,F401,F403,F405,I,Q000,RST210,RST213,RST215,RST304,S311,WPS | ||
ignore = C812,C813,C815,C816,Q000,RST210,RST213,RST215,RST304,W503 | ||
extend-ignore = D,E800,S311,WPS |
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 |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
- pull_request | ||
|
||
env: | ||
PYTHON_VERSION: 3.9 | ||
PYTHON_VERSION: "3.10" | ||
|
||
jobs: | ||
codestyle: | ||
|
@@ -14,45 +14,81 @@ jobs: | |
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v2.2.2 | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install black | ||
- name: Setup poetry | ||
run: | | ||
pip install --upgrade pip | ||
pip install black==20.8b1 | ||
- name: Check code formatting with black | ||
run: black -l 120 . --diff --check | ||
pip install poetry poethepoet | ||
poetry install -n --no-root | ||
- name: Check code formatting with black and isort | ||
run: poe black --diff --check && poe isort --diff --check | ||
|
||
# mypy: | ||
# if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.repository }} | ||
# runs-on: ubuntu-latest | ||
# | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# submodules: recursive | ||
# | ||
# - name: Set up Python ${{ env.PYTHON_VERSION }} | ||
# uses: actions/setup-python@v3 | ||
# with: | ||
# python-version: ${{ env.PYTHON_VERSION }} | ||
# | ||
# - name: Setup poetry | ||
# run: | | ||
# pip install poetry poethepoet | ||
# poetry install -n --no-root | ||
# | ||
# - name: Check typing with mypy | ||
# run: poe mypy | ||
|
||
linter: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Lint with wemake-python-styleguide | ||
uses: wemake-services/wemake-python[email protected] | ||
- name: Set up Python ${{ env.PYTHON_VERSION }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
reporter: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && 'github-pr-review' || 'terminal' }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.github_token }} | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Setup poetry | ||
run: | | ||
pip install poetry poethepoet | ||
poetry install -n --no-root | ||
- name: Check code style with wemake-python-styleguide | ||
run: poe flake8 | ||
|
||
# - name: Lint with wemake-python-styleguide | ||
# uses: wemake-services/[email protected] | ||
# with: | ||
# reporter: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && 'github-pr-review' || 'terminal' }} | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.github_token }} | ||
|
||
docs: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2.3.4 | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
|
@@ -65,19 +101,25 @@ jobs: | |
exit 1 | ||
fi | ||
for category in administration moderation information integrations general; do | ||
ok=1 | ||
for category in */; do | ||
cd $category | ||
for cog in $(ls); do | ||
[[ -d $cog ]] || continue | ||
if ! [[ -f $cog/documentation.md ]]; then | ||
echo ::warning::Could not find documentation for $category/$cog | ||
ok=0 | ||
echo ::error::Could not find documentation for $category$cog | ||
fi | ||
done | ||
cd .. | ||
done | ||
if [[ $ok -ne 1 ]]; then | ||
exit 1 | ||
fi | ||
- name: Lint docs | ||
uses: docker://avtodev/markdown-lint:v1 | ||
with: | ||
|
Oops, something went wrong.