logo

youtube-dl

[mirror] Download/Watch videos from video hostersgit clone https://hacktivis.me/git/mirror/youtube-dl.git

ci.yml (20425B)


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