Enable yamllint for all previously ignored files (#658)

This commit is contained in:
Sviatoslav Sydorenko 2021-11-04 07:56:46 +01:00 committed by GitHub
parent cf6f7e442e
commit 9fa14d70ff
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 108 additions and 100 deletions

2
.github/FUNDING.yml vendored
View File

@ -1 +1,3 @@
---
open_collective: proxypy
...

View File

@ -1,3 +1,4 @@
---
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
@ -5,14 +6,14 @@
# or to provide custom queries or build logic.
name: "CodeQL"
on:
on: # yamllint disable-line rule:truthy
push:
branches: [develop, master]
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
schedule:
- cron: '0 14 * * 1'
- cron: '0 14 * * 1'
jobs:
analyze:
@ -23,10 +24,13 @@ jobs:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
# Supported options are
# ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['python', 'javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
# https://docs.github.com/en/github
# /finding-security-vulnerabilities-and-errors-in-your-code
# /configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
@ -46,26 +50,29 @@ jobs:
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# If you wish to specify custom queries, you can do so here or in a
# config file. By default, queries listed here will override any
# specified in a config file. Prefix the list here with "+" to use
# these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
# If this step fails, then you should remove it and run the build manually
# (see below)
# - name: Autobuild
# uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
# ✏️ If the Autobuild fails above, remove it and uncomment the following
# three lines and modify them (or add more) to build your code if your
# project uses a compiled language
#- run: |
# make bootstrap
# make release
# - run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
...

View File

@ -1,6 +1,7 @@
---
name: Proxy.py Brew
on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
build:
@ -13,14 +14,15 @@ jobs:
max-parallel: 1
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Brew
run: |
brew install ./helper/homebrew/develop/proxy.rb
- name: Verify
run: |
proxy -h
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Brew
run: |
brew install ./helper/homebrew/develop/proxy.rb
- name: Verify
run: |
proxy -h
...

View File

@ -1,6 +1,7 @@
---
name: Proxy.py Dashboard
on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
build:
@ -13,18 +14,19 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
cd dashboard
npm install
cd ..
- name: Build Dashboard
run: |
cd dashboard
npm run build
cd ..
- uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Install Dependencies
run: |
cd dashboard
npm install
cd ..
- name: Build Dashboard
run: |
cd dashboard
npm run build
cd ..
...

View File

@ -1,6 +1,7 @@
---
name: Proxy.py Docker
on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
build:
@ -13,17 +14,18 @@ jobs:
max-parallel: 1
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Build
run: |
make container
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Build
run: |
make container
...

View File

@ -1,6 +1,7 @@
---
name: Proxy.py Library
on: [push, pull_request]
on: [push, pull_request] # yamllint disable-line rule:truthy
jobs:
build:
@ -13,29 +14,34 @@ jobs:
max-parallel: 4
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Run Tests
run: pytest --cov=proxy tests/
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: codecov
- name: Integration testing
if: matrix.os != 'windows'
run: |
pip install .
proxy --hostname 127.0.0.1 --enable-web-server --pid-file proxy.pid --log-file proxy.log &
./tests/integration/main.sh
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-testing.txt
pip install -r requirements-tunnel.txt
- name: Run Tests
run: pytest --cov=proxy tests/
- name: Upload coverage to Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: codecov
- name: Integration testing
if: matrix.os != 'windows'
run: |
pip install .
proxy \
--hostname 127.0.0.1 \
--enable-web-server \
--pid-file proxy.pid \
--log-file proxy.log \
&
./tests/integration/main.sh
tox:
name: ${{ matrix.toxenv }}
@ -126,3 +132,4 @@ jobs:
run: >-
print("All's good")
shell: python
...

View File

@ -85,12 +85,10 @@ repos:
- id: check-byte-order-marker
- id: check-case-conflict
# disabled due to pre-commit/pre-commit-hooks#159
#- id: check-docstring-first
# - id: check-docstring-first
- id: check-json
- id: check-symlinks
- id: check-yaml
# args:
# - --unsafe
- id: detect-private-key
# Heavy checks:
@ -141,20 +139,6 @@ repos:
rev: v1.26.2
hooks:
- id: yamllint
exclude: |
(?x)
^
\.pre-commit-config\.yaml|
(
\.github/(
workflows/(
codeql-analysis|test-(brew|dashboard|docker|library)
)|
FUNDING
)|
codecov
)\.yml
$
args:
- --strict
types: [file, yaml]

View File

@ -1,7 +1,8 @@
---
codecov:
require_ci_to_pass: yes
require_ci_to_pass: yes # yamllint disable-line rule:truthy
notify:
wait_for_ci: yes
wait_for_ci: yes # yamllint disable-line rule:truthy
coverage:
status:
project:
@ -10,3 +11,4 @@ coverage:
patch:
default:
threshold: 1%
...