@@ -46,14 +46,14 @@ steps:
4646 use-mypy : false
4747 use-vulture : true
4848 extra-pylint-options : " --output-format=" colorized"
49- conda- python-version : " 3.7"
49+ python-version : " 3.7"
5050` ` `
5151
5252## Details
5353
54- Uses conda environment with user selected python version . Only python ` 3.6` - `3.9`
55- version are tested since they are by far most common now. Other python `3.x` versions
56- should also work. Any python `2.x` versions are unsupported!
54+ Uses ` actions/setup- python@v2` . Only python `3.6` - `3.10` version are tested since
55+ they are by far most common now. Other python `3.x` versions should also work.
56+ Any python `2.x` versions are unsupported!
5757
5858The lintner versions are :
5959
@@ -70,12 +70,15 @@ isort==isort-5.7.0
7070
7171# # IMPORTANT - test environment
7272
73- The python version you set up in your action script with `actions/setup-python@v2`
74- or by other means will not affect the linting process. The python version used by
75- the linters can be set up only by `conda-python-version` argument! This also means
76- that if you modify the system conda environment it might affect the lintnig process.
77- So it is best to keep the lintnig action separated from others. It is also recomended
78- to run this on `ubuntu-latest`. Example :
73+ The python version is set by `actions/setup-python@v2` using composite actions. This
74+ means that the the action will change python you might have previously set with
75+ ` actions/setup-python@v2` . There are two ways to circumvent this.
76+
77+ - Keep the lintnig action separated from others
78+ - Use it at the and of your workflow when the change in python version will not
79+ affect anything else
80+
81+ Example :
7982
8083` ` ` yml
8184on:
@@ -85,9 +88,15 @@ name: Lint Python
8588jobs:
8689 lintpython:
8790 name: Lint Python
88- runs-on: ubuntu-20.04
91+ runs-on: ubuntu-latest
8992 steps:
9093 - uses: actions/checkout@v1
94+ - uses: actions/setup-python@v2
95+ with:
96+ python-version: 3.9
97+ - run: |
98+ python --version # this will output 3.9 now
99+ run tests or other things using python ...
91100 - uses: marian-code/pyaction@v2
92101 with:
93102 python-root-list: "./tests/*.py"
@@ -100,7 +109,9 @@ jobs:
100109 use-pylint: false
101110 use-flake8: false
102111 use-vulture: true
103- conda-python-version: "3.8"
112+ python-version: "3.7"
113+ - run: |
114+ python --version # this will output 3.7 now !!!
104115` ` `
105116
106117# # License
0 commit comments