Bump github/codeql-action from 2 to 3 #257
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
--- | |
name: Checks | |
on: # yamllint disable-line rule:truthy | |
push: | |
branches: ["*"] | |
pull_request: | |
branches: ["*"] | |
jobs: | |
lint: | |
name: Linters | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.8' | |
- name: Install pip | |
run: | | |
python -m pip install --upgrade pip | |
- name: Install linters | |
run: >- | |
python -m pip install --upgrade | |
wheel | |
"yamllint>=1.27.1" | |
pylint | |
"flake8>=4.0.0" | |
"flake8-aaa>=0.12.1" | |
"flake8-bugbear>=22.6.22" | |
"flake8-comprehensions>=3.9.0" | |
flake8-debugger | |
"flake8-docstrings>=1.5.0" | |
"flake8-eradicate>=1.2.0" | |
flake8-expression-complexity | |
flake8-fixme | |
flake8-import-order | |
flake8-markdown | |
flake8-mutable | |
flake8-plugin-utils | |
flake8-polyfill | |
flake8-pytest | |
flake8-pytest-style | |
flake8-simplify | |
flake8-typing-imports | |
flake8-use-fstring | |
flake8-variables-names | |
mccabe | |
pep8-naming | |
pycodestyle | |
pyflakes | |
- name: lint YAML files, excluding examples | |
run: yamllint --strict $(git ls-files '*.yaml' '*.yml' '.yamllint' | grep -v ^examples/) | |
- name: lint Python code through flake8 | |
run: flake8 . | |
- name: lint Python code through pylint | |
run: pylint yamlfixer | |
tests: | |
name: Tests | |
needs: [lint] | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: | |
- '3.7' | |
- '3.8' | |
- '3.9' | |
- '3.10' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Append GitHub Actions system path | |
run: echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: install coveralls | |
run: pip install coveralls | |
- name: install yamlfixer | |
run: pip install . | |
- name: launch tests | |
run: coverage run --source=yamlfixer -m unittest discover |