ci.yml 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452
  1. name: CI
  2. env:
  3. all-cpython-versions: 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12
  4. main-cpython-versions: 2.7, 3.2, 3.5, 3.9, 3.11
  5. pypy-versions: pypy-2.7, pypy-3.6, pypy-3.7
  6. cpython-versions: main
  7. test-set: core
  8. on:
  9. push:
  10. inputs:
  11. cpython-versions:
  12. type: string
  13. default: all
  14. test-set:
  15. type: string
  16. default: core
  17. pull_request:
  18. inputs:
  19. cpython-versions:
  20. type: string
  21. default: main
  22. test-set:
  23. type: string
  24. default: both
  25. workflow_dispatch:
  26. inputs:
  27. cpython-versions:
  28. type: choice
  29. description: CPython versions (main = 2.7, 3.2, 3.5, 3.9, 3.11)
  30. options:
  31. - all
  32. - main
  33. required: true
  34. default: main
  35. test-set:
  36. type: choice
  37. description: core, download
  38. options:
  39. - both
  40. - core
  41. - download
  42. required: true
  43. default: both
  44. permissions:
  45. contents: read
  46. jobs:
  47. select:
  48. name: Select tests from inputs
  49. runs-on: ubuntu-latest
  50. outputs:
  51. cpython-versions: ${{ steps.run.outputs.cpython-versions }}
  52. test-set: ${{ steps.run.outputs.test-set }}
  53. own-pip-versions: ${{ steps.run.outputs.own-pip-versions }}
  54. steps:
  55. - name: Make version array
  56. id: run
  57. run: |
  58. # Make a JSON Array from comma/space-separated string (no extra escaping)
  59. json_list() { \
  60. ret=""; IFS="${IFS},"; set -- $*; \
  61. for a in "$@"; do \
  62. ret=$(printf '%s"%s"' "${ret}${ret:+, }" "$a"); \
  63. done; \
  64. printf '[%s]' "$ret"; }
  65. tests="${{ inputs.test-set || env.test-set }}"
  66. [ $tests = both ] && tests="core download"
  67. printf 'test-set=%s\n' "$(json_list $tests)" >> "$GITHUB_OUTPUT"
  68. versions="${{ inputs.cpython-versions || env.cpython-versions }}"
  69. if [ "$versions" = all ]; then \
  70. versions="${{ env.all-cpython-versions }}"; else \
  71. versions="${{ env.main-cpython-versions }}"; \
  72. fi
  73. printf 'cpython-versions=%s\n' \
  74. "$(json_list ${versions}${versions:+, }${{ env.pypy-versions }})" >> "$GITHUB_OUTPUT"
  75. # versions with a special get-pip.py in a per-version subdirectory
  76. printf 'own-pip-versions=%s\n' \
  77. "$(json_list 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, 3.6)" >> "$GITHUB_OUTPUT"
  78. tests:
  79. name: Run tests
  80. needs: select
  81. permissions:
  82. contents: read
  83. packages: write
  84. runs-on: ${{ matrix.os }}
  85. env:
  86. PIP: python -m pip
  87. PIP_DISABLE_PIP_VERSION_CHECK: true
  88. PIP_NO_PYTHON_VERSION_WARNING: true
  89. strategy:
  90. fail-fast: true
  91. matrix:
  92. os: [ubuntu-20.04]
  93. python-version: ${{ fromJSON(needs.select.outputs.cpython-versions) }}
  94. python-impl: [cpython]
  95. ytdl-test-set: ${{ fromJSON(needs.select.outputs.test-set) }}
  96. run-tests-ext: [sh]
  97. include:
  98. - os: windows-2019
  99. python-version: 3.4
  100. python-impl: cpython
  101. ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'core') && 'core' || 'nocore' }}
  102. run-tests-ext: bat
  103. - os: windows-2019
  104. python-version: 3.4
  105. python-impl: cpython
  106. ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'download') && 'download' || 'nodownload' }}
  107. run-tests-ext: bat
  108. # jython
  109. - os: ubuntu-20.04
  110. python-version: 2.7
  111. python-impl: jython
  112. ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'core') && 'core' || 'nocore' }}
  113. run-tests-ext: sh
  114. - os: ubuntu-20.04
  115. python-version: 2.7
  116. python-impl: jython
  117. ytdl-test-set: ${{ contains(needs.select.outputs.test-set, 'download') && 'download' || 'nodownload' }}
  118. run-tests-ext: sh
  119. steps:
  120. - name: Prepare Linux
  121. if: ${{ startswith(matrix.os, 'ubuntu') }}
  122. shell: bash
  123. run: |
  124. # apt in runner, if needed, may not be up-to-date
  125. sudo apt-get update
  126. - name: Checkout
  127. uses: actions/checkout@v3
  128. #-------- Python 3 -----
  129. - name: Set up supported Python ${{ matrix.python-version }}
  130. id: setup-python
  131. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version != '2.6' && matrix.python-version != '2.7' && matrix.python-version != '3.12'}}
  132. # wrap broken actions/setup-python@v4
  133. # NB may run apt-get install in Linux
  134. uses: ytdl-org/setup-python@v1
  135. with:
  136. python-version: ${{ matrix.python-version }}
  137. cache-build: true
  138. allow-build: info
  139. - name: Locate supported Python ${{ matrix.python-version }}
  140. if: ${{ env.pythonLocation }}
  141. shell: bash
  142. run: |
  143. echo "PYTHONHOME=${pythonLocation}" >> "$GITHUB_ENV"
  144. export expected="${{ steps.setup-python.outputs.python-path }}"
  145. dirname() { printf '%s\n' \
  146. 'import os, sys' \
  147. 'print(os.path.dirname(sys.argv[1]))' \
  148. | ${expected} - "$1"; }
  149. expd="$(dirname "$expected")"
  150. export python="$(command -v python)"
  151. [ "$expd" = "$(dirname "$python")" ] || echo "PATH=$expd:${PATH}" >> "$GITHUB_ENV"
  152. [ -x "$python" ] || printf '%s\n' \
  153. 'import os' \
  154. 'exp = os.environ["expected"]' \
  155. 'python = os.environ["python"]' \
  156. 'exps = os.path.split(exp)' \
  157. 'if python and (os.path.dirname(python) == exp[0]):' \
  158. ' exit(0)' \
  159. 'exps[1] = "python" + os.path.splitext(exps[1])[1]' \
  160. 'python = os.path.join(*exps)' \
  161. 'try:' \
  162. ' os.symlink(exp, python)' \
  163. 'except AttributeError:' \
  164. ' os.rename(exp, python)' \
  165. | ${expected} -
  166. printf '%s\n' \
  167. 'import sys' \
  168. 'print(sys.path)' \
  169. | ${expected} -
  170. #-------- Python 3.12 -
  171. - name: Set up CPython 3.12 environment
  172. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '3.12' }}
  173. shell: bash
  174. run: |
  175. PYENV_ROOT=$HOME/.local/share/pyenv
  176. echo "PYENV_ROOT=${PYENV_ROOT}" >> "$GITHUB_ENV"
  177. - name: Cache Python 3.12
  178. id: cache312
  179. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '3.12' }}
  180. uses: actions/cache@v3
  181. with:
  182. key: python-3.12
  183. path: |
  184. ${{ env.PYENV_ROOT }}
  185. - name: Build and set up Python 3.12
  186. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '3.12' && ! steps.cache312.outputs.cache-hit }}
  187. # dl and build locally
  188. shell: bash
  189. run: |
  190. # Install build environment
  191. sudo apt-get install -y build-essential llvm libssl-dev tk-dev \
  192. libncursesw5-dev libreadline-dev libsqlite3-dev \
  193. libffi-dev xz-utils zlib1g-dev libbz2-dev liblzma-dev
  194. # Download PyEnv from its GitHub repository.
  195. export PYENV_ROOT=${{ env.PYENV_ROOT }}
  196. export PATH=$PYENV_ROOT/bin:$PATH
  197. git clone "https://github.com/pyenv/pyenv.git" "$PYENV_ROOT"
  198. pyenv install 3.12.0b4
  199. - name: Locate Python 3.12
  200. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '3.12' }}
  201. shell: bash
  202. run: |
  203. PYTHONHOME="${{ env.PYENV_ROOT }}/versions/3.12.0b4"
  204. echo "PYTHONHOME=$PYTHONHOME" >> "$GITHUB_ENV"
  205. echo "PATH=${PYTHONHOME}/bin:$PATH" >> "$GITHUB_ENV"
  206. #-------- Python 2.7 --
  207. - name: Set up Python 2.7
  208. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '2.7' }}
  209. # install 2.7
  210. shell: bash
  211. run: |
  212. sudo apt-get install -y python2 python-is-python2
  213. echo "PYTHONHOME=/usr" >> "$GITHUB_ENV"
  214. #-------- Python 2.6 --
  215. - name: Set up Python 2.6 environment
  216. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '2.6' }}
  217. shell: bash
  218. run: |
  219. openssl_name=openssl-1.0.2u
  220. echo "openssl_name=${openssl_name}" >> "$GITHUB_ENV"
  221. openssl_dir=$HOME/.local/opt/$openssl_name
  222. echo "openssl_dir=${openssl_dir}" >> "$GITHUB_ENV"
  223. PYENV_ROOT=$HOME/.local/share/pyenv
  224. echo "PYENV_ROOT=${PYENV_ROOT}" >> "$GITHUB_ENV"
  225. sudo apt-get install -y openssl ca-certificates
  226. - name: Cache Python 2.6
  227. id: cache26
  228. if: ${{ matrix.python-version == '2.6' }}
  229. uses: actions/cache@v3
  230. with:
  231. key: python-2.6.9
  232. path: |
  233. ${{ env.openssl_dir }}
  234. ${{ env.PYENV_ROOT }}
  235. - name: Build and set up Python 2.6
  236. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '2.6' && ! steps.cache26.outputs.cache-hit }}
  237. # dl and build locally
  238. shell: bash
  239. run: |
  240. # Install build environment
  241. sudo apt-get install -y build-essential llvm libssl-dev tk-dev \
  242. libncursesw5-dev libreadline-dev libsqlite3-dev \
  243. libffi-dev xz-utils zlib1g-dev libbz2-dev liblzma-dev
  244. # Download and install OpenSSL 1.0.2, back in time
  245. openssl_name=${{ env.openssl_name }}
  246. openssl_targz=${openssl_name}.tar.gz
  247. openssl_dir=${{ env.openssl_dir }}
  248. openssl_inc=$openssl_dir/include
  249. openssl_lib=$openssl_dir/lib
  250. openssl_ssl=$openssl_dir/ssl
  251. curl -L "https://www.openssl.org/source/$openssl_targz" -o $openssl_targz
  252. tar -xf $openssl_targz
  253. ( cd $openssl_name; \
  254. ./config --prefix=$openssl_dir --openssldir=${openssl_dir}/ssl \
  255. --libdir=lib -Wl,-rpath=${openssl_dir}/lib shared zlib-dynamic && \
  256. make && \
  257. make install )
  258. rm -rf $openssl_name
  259. rmdir $openssl_ssl/certs && ln -s /etc/ssl/certs $openssl_ssl/certs
  260. # Download PyEnv from its GitHub repository.
  261. export PYENV_ROOT=${{ env.PYENV_ROOT }}
  262. export PATH=$PYENV_ROOT/bin:$PATH
  263. git clone "https://github.com/pyenv/pyenv.git" "$PYENV_ROOT"
  264. # Prevent pyenv build trying (and failing) to update pip
  265. export GET_PIP=get-pip-2.6.py
  266. echo 'import sys; sys.exit(0)' > ${GET_PIP}
  267. GET_PIP=$(realpath $GET_PIP)
  268. # Build and install Python
  269. export CFLAGS="-I$openssl_inc"
  270. export LDFLAGS="-L$openssl_lib"
  271. export LD_LIBRARY_PATH="$openssl_lib"
  272. pyenv install 2.6.9
  273. - name: Locate Python 2.6
  274. if: ${{ matrix.python-impl == 'cpython' && matrix.python-version == '2.6' }}
  275. shell: bash
  276. run: |
  277. PYTHONHOME="${{ env.PYENV_ROOT }}/versions/2.6.9"
  278. echo "PYTHONHOME=$PYTHONHOME" >> "$GITHUB_ENV"
  279. echo "PATH=${PYTHONHOME}/bin:$PATH" >> "$GITHUB_ENV"
  280. echo "LD_LIBRARY_PATH=${{ env.openssl_dir }}/lib${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}" >> "$GITHUB_ENV"
  281. #-------- Jython ------
  282. - name: Set up Java 8
  283. if: ${{ matrix.python-impl == 'jython' }}
  284. uses: actions/setup-java@v3
  285. with:
  286. java-version: 8
  287. distribution: 'zulu'
  288. - name: Setup Jython environment
  289. if: ${{ matrix.python-impl == 'jython' }}
  290. shell: bash
  291. run: |
  292. echo "JYTHON_ROOT=${HOME}/jython" >> "$GITHUB_ENV"
  293. echo "PIP=pip" >> "$GITHUB_ENV"
  294. - name: Cache Jython
  295. id: cachejy
  296. if: ${{ matrix.python-impl == 'jython' && matrix.python-version == '2.7' }}
  297. uses: actions/cache@v3
  298. with:
  299. # 2.7.3 now available, may solve SNI issue
  300. key: jython-2.7.1
  301. path: |
  302. ${{ env.JYTHON_ROOT }}
  303. - name: Install Jython
  304. if: ${{ matrix.python-impl == 'jython' && matrix.python-version == '2.7' && ! steps.cachejy.outputs.cache-hit }}
  305. shell: bash
  306. run: |
  307. JYTHON_ROOT="${{ env.JYTHON_ROOT }}"
  308. curl -L "https://repo1.maven.org/maven2/org/python/jython-installer/2.7.1/jython-installer-2.7.1.jar" -o jython-installer.jar
  309. java -jar jython-installer.jar -s -d "${JYTHON_ROOT}"
  310. echo "${JYTHON_ROOT}/bin" >> "$GITHUB_PATH"
  311. - name: Set up cached Jython
  312. if: ${{ steps.cachejy.outputs.cache-hit }}
  313. shell: bash
  314. run: |
  315. JYTHON_ROOT="${{ env.JYTHON_ROOT }}"
  316. echo "${JYTHON_ROOT}/bin" >> $GITHUB_PATH
  317. - name: Install supporting Python 2.7 if possible
  318. if: ${{ steps.cachejy.outputs.cache-hit }}
  319. shell: bash
  320. run: |
  321. sudo apt-get install -y python2.7 || true
  322. #-------- pip ---------
  323. - name: Set up supported Python ${{ matrix.python-version }} pip
  324. if: ${{ (matrix.python-version != '3.2' && steps.setup-python.outputs.python-path) || matrix.python-version == '2.7' }}
  325. # This step may run in either Linux or Windows
  326. shell: bash
  327. run: |
  328. echo "$PATH"
  329. echo "$PYTHONHOME"
  330. # curl is available on both Windows and Linux, -L follows redirects, -O gets name
  331. python -m ensurepip || python -m pip --version || { \
  332. get_pip="${{ contains(needs.select.outputs.own-pip-versions, matrix.python-version) && format('{0}/', matrix.python-version) || '' }}"; \
  333. curl -L -O "https://bootstrap.pypa.io/pip/${get_pip}get-pip.py"; \
  334. python get-pip.py; }
  335. - name: Set up Python 2.6 pip
  336. if: ${{ matrix.python-version == '2.6' }}
  337. shell: bash
  338. run: |
  339. python -m pip --version || { \
  340. curl -L -O "https://bootstrap.pypa.io/pip/2.6/get-pip.py"; \
  341. curl -L -O "https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl"; \
  342. python get-pip.py --no-setuptools --no-wheel pip-9.0.3-py2.py3-none-any.whl; }
  343. # work-around to invoke pip module on 2.6: https://bugs.python.org/issue2751
  344. echo "PIP=python -m pip.__main__" >> "$GITHUB_ENV"
  345. - name: Set up other Python ${{ matrix.python-version }} pip
  346. if: ${{ matrix.python-version == '3.2' && steps.setup-python.outputs.python-path }}
  347. shell: bash
  348. run: |
  349. python -m pip --version || { \
  350. curl -L -O "https://bootstrap.pypa.io/pip/3.2/get-pip.py"; \
  351. curl -L -O "https://files.pythonhosted.org/packages/b2/d0/cd115fe345dd6f07ec1c780020a7dfe74966fceeb171e0f20d1d4905b0b7/pip-7.1.2-py2.py3-none-any.whl"; \
  352. python get-pip.py --no-setuptools --no-wheel pip-7.1.2-py2.py3-none-any.whl; }
  353. #-------- unittest ----
  354. - name: Upgrade Unittest for Python 2.6
  355. if: ${{ matrix.python-version == '2.6' }}
  356. shell: bash
  357. run: |
  358. # Work around deprecation of support for non-SNI clients at PyPI CDN (see https://status.python.org/incidents/hzmjhqsdjqgb)
  359. $PIP -qq show unittest2 || { \
  360. for u in "65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl" \
  361. "f2/94/3af39d34be01a24a6e65433d19e107099374224905f1e0cc6bbe1fd22a2f/argparse-1.4.0-py2.py3-none-any.whl" \
  362. "c7/a3/c5da2a44c85bfbb6eebcfc1dde24933f8704441b98fdde6528f4831757a6/linecache2-1.0.0-py2.py3-none-any.whl" \
  363. "17/0a/6ac05a3723017a967193456a2efa0aa9ac4b51456891af1e2353bb9de21e/traceback2-1.4.0-py2.py3-none-any.whl" \
  364. "72/20/7f0f433060a962200b7272b8c12ba90ef5b903e218174301d0abfd523813/unittest2-1.1.0-py2.py3-none-any.whl"; do \
  365. curl -L -O "https://files.pythonhosted.org/packages/${u}"; \
  366. $PIP install ${u##*/}; \
  367. done; }
  368. # make tests use unittest2
  369. for test in ./test/test_*.py ./test/helper.py; do
  370. sed -r -i -e '/^import unittest$/s/test/test2 as unittest/' "$test"
  371. done
  372. #-------- nose --------
  373. - name: Install nose for Python ${{ matrix.python-version }}
  374. if: ${{ (matrix.python-version != '3.2' && steps.setup-python.outputs.python-path) || (matrix.python-impl == 'cpython' && (matrix.python-version == '2.7' || matrix.python-version == '3.12')) }}
  375. shell: bash
  376. run: |
  377. echo "$PATH"
  378. echo "$PYTHONHOME"
  379. # Use PyNose for recent Pythons instead of Nose
  380. py3ver="${{ matrix.python-version }}"
  381. py3ver=${py3ver#3.}
  382. [ "$py3ver" != "${{ matrix.python-version }}" ] && py3ver=${py3ver%.*} || py3ver=0
  383. [ "$py3ver" -ge 9 ] && nose=pynose || nose=nose
  384. $PIP -qq show $nose || $PIP install $nose
  385. - name: Install nose for other Python 2
  386. if: ${{ matrix.python-impl == 'jython' || (matrix.python-impl == 'cpython' && matrix.python-version == '2.6') }}
  387. shell: bash
  388. run: |
  389. # Work around deprecation of support for non-SNI clients at PyPI CDN (see https://status.python.org/incidents/hzmjhqsdjqgb)
  390. $PIP -qq show nose || { \
  391. curl -L -O "https://files.pythonhosted.org/packages/99/4f/13fb671119e65c4dce97c60e67d3fd9e6f7f809f2b307e2611f4701205cb/nose-1.3.7-py2-none-any.whl"; \
  392. $PIP install nose-1.3.7-py2-none-any.whl; }
  393. - name: Install nose for other Python 3
  394. if: ${{ matrix.python-version == '3.2' && steps.setup-python.outputs.python-path }}
  395. shell: bash
  396. run: |
  397. $PIP -qq show nose || { \
  398. curl -L -O "https://files.pythonhosted.org/packages/15/d8/dd071918c040f50fa1cf80da16423af51ff8ce4a0f2399b7bf8de45ac3d9/nose-1.3.7-py3-none-any.whl"; \
  399. $PIP install nose-1.3.7-py3-none-any.whl; }
  400. - name: Set up nosetest test
  401. if: ${{ contains(needs.select.outputs.test-set, matrix.ytdl-test-set ) }}
  402. shell: bash
  403. run: |
  404. # set PYTHON_VER
  405. PYTHON_VER=${{ matrix.python-version }}
  406. [ "${PYTHON_VER#*-}" != "$PYTHON_VER" ] || PYTHON_VER="${{ matrix.python-impl }}-${PYTHON_VER}"
  407. echo "PYTHON_VER=$PYTHON_VER" >> "$GITHUB_ENV"
  408. echo "PYTHON_IMPL=${{ matrix.python-impl }}" >> "$GITHUB_ENV"
  409. # define a test to validate the Python version used by nosetests
  410. printf '%s\n' \
  411. 'from __future__ import unicode_literals' \
  412. 'import sys, os, platform' \
  413. 'try:' \
  414. ' import unittest2 as unittest' \
  415. 'except ImportError:' \
  416. ' import unittest' \
  417. 'class TestPython(unittest.TestCase):' \
  418. ' def setUp(self):' \
  419. ' self.ver = os.environ["PYTHON_VER"].split("-")' \
  420. ' def test_python_ver(self):' \
  421. ' self.assertEqual(["%d" % v for v in sys.version_info[:2]], self.ver[-1].split(".")[:2])' \
  422. ' self.assertTrue(sys.version.startswith(self.ver[-1]))' \
  423. ' self.assertIn(self.ver[0], ",".join((sys.version, platform.python_implementation())).lower())' \
  424. ' def test_python_impl(self):' \
  425. ' self.assertIn(platform.python_implementation().lower(), (os.environ["PYTHON_IMPL"], self.ver[0]))' \
  426. > test/test_python.py
  427. #-------- TESTS -------
  428. - name: Run tests
  429. if: ${{ contains(needs.select.outputs.test-set, matrix.ytdl-test-set ) }}
  430. continue-on-error: ${{ matrix.ytdl-test-set == 'download' || matrix.python-impl == 'jython' }}
  431. env:
  432. YTDL_TEST_SET: ${{ matrix.ytdl-test-set }}
  433. run: |
  434. ./devscripts/run_tests.${{ matrix.run-tests-ext }}
  435. flake8:
  436. name: Linter
  437. runs-on: ubuntu-latest
  438. steps:
  439. - uses: actions/checkout@v3
  440. - name: Set up Python
  441. uses: actions/setup-python@v4
  442. with:
  443. python-version: 3.9
  444. - name: Install flake8
  445. run: pip install flake8
  446. - name: Run flake8
  447. run: flake8 .