Skip to content

Commit

Permalink
Merge branch 'gh-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
toonn committed Aug 18, 2023
2 parents 69a3d21 + f3e93c7 commit 0e9ca52
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 44 deletions.
36 changes: 0 additions & 36 deletions .github/workflows/other.yml

This file was deleted.

39 changes: 33 additions & 6 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ name: PR Pylint, PEP8 and Pytest
on: pull_request

jobs:
test_pylint:
test_PR:
env:
TERM: xterm
runs-on: ubuntu-latest
strategy:
max-parallel: 4
Expand All @@ -25,22 +27,47 @@ jobs:
with:
list-files: 'shell'
filters: |
this-workflow:
- modified: '.github/workflows/pr.yml'
code:
- added|modified: '!(ranger/config)**.py'
config:
- added|modified: 'ranger/config/**.py'
- name: Lint code with Flake8 and Pylint
if: ${{ steps.path-filter.outputs.code == 'true' }}
- name: Lint changed code with Flake8 and Pylint
if: steps.paths-filter.outputs.code == 'true'
&& steps.paths-filter.outputs.this-workflow == 'false'
run: |
flake8 ${{ steps.paths-filter.outputs.code_files }}
pylint ${{ steps.paths-filter.outputs.code_files }}
- name: Lint config with Flake8 and Pylint
if: ${{ steps.path-filter.outputs.config == 'true' }}
- name: Lint all code with Flake8 and Pylint
if: steps.paths-filter.outputs.this-workflow == 'true'
run: |
make TEST_PATHS_CONFIG= test_flake8
make TEST_PATHS_CONFIG=--version test_pylint
- name: Lint changed config with Flake8 and Pylint
if: steps.paths-filter.outputs.config == 'true'
&& steps.paths-filter.outputs.this-workflow == 'false'
run: |
flake8 ${{ steps.paths-filter.outputs.config }}
pylint --rcfile=ranger/config/.pylintrc \
${{ steps.paths-filter.outputs.config_files }}
- name: Lint all config with Flake8 and Pylint
if: steps.paths-filter.outputs.this-workflow == 'true'
run: |
make TEST_PATHS_MAIN= test_flake8
make TEST_PATHS_MAIN=--version test_pylint
- name: Run doctest
if: steps.paths-filter.outputs.code == 'true'
|| steps.paths-filter.outputs.this-workflow == 'true'
run: |
make test_doctest
- name: Test code with Pytest
if: ${{ steps.path-filter.outputs.code == 'true' }}
if: steps.paths-filter.outputs.code == 'true'
|| steps.paths-filter.outputs.this-workflow == 'true'
run: |
make test_pytest
- name: Check man page completeness
if: steps.paths-filter.outputs.code == 'true'
|| steps.paths-filter.outputs.this-workflow == 'true'
run: |
make test_other
4 changes: 2 additions & 2 deletions .github/workflows/pylint.yml → .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Pylint, PEP8 and Pytest
name: Python linting and tests

on:
push:
Expand Down Expand Up @@ -26,4 +26,4 @@ jobs:
pip install -r requirements.txt
- name: Lint with Flake8 and Pylint, test with Pytest
run: |
make test_flake8 test_pylint test_pytest
make test_py

0 comments on commit 0e9ca52

Please sign in to comment.