Skip to content

Commit afe1cb4

Browse files
committed
bugfix
1 parent ea84886 commit afe1cb4

File tree

2 files changed

+40
-9
lines changed

2 files changed

+40
-9
lines changed

action.yml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,23 +86,48 @@ runs:
8686
python-version: ${{ inputs.python-version }}
8787
architecture: x64
8888
cache: pip
89-
89+
9090
- run: python --version
9191
shell: bash
9292

93-
- name: Is Windows
93+
- name: Windows install dependencies
9494
if: ${{ runner.os == 'Windows' }}
9595
run: |
9696
pip install -r ${{ github.action_path }}\requirements.txt
9797
echo "path_sep=" >> $GITHUB_ENV
9898
shell: pwsh
9999

100-
- name: Is Posix
100+
- name: Posix install dependencies
101101
if: ${{ runner.os != 'Windows' }}
102102
run: pip install -r ${{ github.action_path }}/requirements.txt
103103
shell: bash
104104

105-
- run: >
105+
- name: Lint on Windows
106+
if: ${{ runner.os == 'Windows' }}
107+
run: >
108+
${{ github.action_path }}\entrypoint.sh
109+
'${{ inputs.python-root-list }}'
110+
${{ inputs.use-pylint }}
111+
${{ inputs.use-pycodestyle }}
112+
${{ inputs.use-flake8 }}
113+
${{ inputs.use-black }}
114+
${{ inputs.use-mypy }}
115+
${{ inputs.use-isort }}
116+
${{ inputs.use-vulture }}
117+
${{ inputs.use-pydocstyle }}
118+
'${{ inputs.extra-pylint-options }}'
119+
'${{ inputs.extra-pycodestyle-options }}'
120+
'${{ inputs.extra-flake8-options }}'
121+
'${{ inputs.extra-black-options }}'
122+
'${{ inputs.extra-mypy-options }}'
123+
'${{ inputs.extra-isort-options }}'
124+
'${{ inputs.extra-vulture-options }}'
125+
'${{ inputs.extra-pydocstyle-options }}'
126+
shell: pwsh
127+
128+
- name: Lint on Linux
129+
if: ${{ runner.os == 'Linux' }}
130+
run: >
106131
${{ github.action_path }}/entrypoint.sh
107132
'${{ inputs.python-root-list }}'
108133
${{ inputs.use-pylint }}
@@ -121,5 +146,4 @@ runs:
121146
'${{ inputs.extra-isort-options }}'
122147
'${{ inputs.extra-vulture-options }}'
123148
'${{ inputs.extra-pydocstyle-options }}'
124-
shell: bash
125-
name: Lint
149+
shell: pwsh

entrypoint.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#!/bin/sh -l
2-
31
# Parameters
42
#
53
# $1 - python-root-list
@@ -39,7 +37,16 @@ echo extra-vulture-options: ${16}
3937
echo extra-pydocstyle-options: ${17}
4038

4139
# actions path has the copy of this actions repo
42-
for matcher in $GITHUB_ACTION_PATH/matchers/*.json
40+
echo $RUNNER_OS
41+
if [ $RUNNER_OS = 'Windows' ]
42+
then
43+
MATCHERS=$GITHUB_ACTION_PATH\matchers\*.json
44+
else
45+
MATCHERS=$GITHUB_ACTION_PATH/matchers/*.json
46+
fi
47+
echo $MATCHERS
48+
49+
for matcher in $MATCHERS
4350
do
4451
echo adding matcher $matcher
4552
echo "::add-matcher::${matcher}"

0 commit comments

Comments
 (0)