Resolve coverage gaps, tighten code up #1244
This file contains hidden or 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: Linting | |
env: | |
LC_ALL: "C.UTF-8" # prevent ERROR: Ansible could not initialize the preferred locale: unsupported locale setting | |
on: | |
pull_request: | |
push: | |
jobs: | |
common-tests: | |
name: ${{ matrix.tests.name }} | |
runs-on: ubuntu-latest | |
permissions: | |
packages: write | |
contents: read | |
strategy: | |
fail-fast: false | |
matrix: | |
tests: | |
- name: api-flake8 | |
command: check_flake8 | |
- name: api-black | |
command: check_black | |
- name: api-isort | |
command: check_isort | |
- name: pure-python-imports | |
command: check_pure_python_imports | |
steps: | |
- name: Install make | |
run: sudo apt install make | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install python 3.11 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install requirments | |
run: pip3.11 install -r requirements/requirements_dev.txt | |
- name: Install test dependencies for pure-python-imports | |
if: matrix.tests.name == 'pure-python-imports' | |
run: | | |
pip3.11 install -r requirements/requirements.in | |
pip3.11 install -r requirements/requirements_testing.txt | |
pip3.11 install -r requirements/requirements_channels.in | |
pip3.11 install -r requirements/requirements_redis_client.in | |
- name: Run pure-python-imports check | |
if: matrix.tests.name == 'pure-python-imports' | |
run: python tools/scripts/check_pure_python_imports.py | |
- name: Run check ${{ matrix.tests.name }} | |
if: matrix.tests.name != 'pure-python-imports' | |
run: make ${{ matrix.tests.command }} |