From 9d509253c3a25a1ab8082e2d7985d17a0ef187ea Mon Sep 17 00:00:00 2001 From: Deniz Turgut Date: Thu, 20 Oct 2022 02:48:01 +0300 Subject: [PATCH 1/3] update github actions see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/ https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/ --- .github/workflows/main.yml | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 50a8714c..59d6c95c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -29,13 +29,13 @@ jobs: python: "3.7" steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python ${{ matrix.config.python }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.config.python }} - name: Set up Pip cache (Linux) - uses: actions/cache@v2 + uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip @@ -43,7 +43,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - name: Set up Pip cache (macOS) - uses: actions/cache@v2 + uses: actions/cache@v3 if: startsWith(runner.os, 'macOS') with: path: ~/Library/Caches/pip @@ -51,7 +51,7 @@ jobs: restore-keys: | ${{ runner.os }}-pip- - name: Setup pip cache (Windows) - uses: actions/cache@v2 + uses: actions/cache@v3 if: startsWith(runner.os, 'Windows') with: path: ~\AppData\Local\pip\Cache @@ -62,7 +62,7 @@ jobs: if: startsWith(runner.os, 'Linux') run: sudo locale-gen fr_FR.UTF-8 tr_TR.UTF-8 - name: Install pandoc - uses: r-lib/actions/setup-pandoc@v1 + uses: r-lib/actions/setup-pandoc@v2 with: pandoc-version: "2.9.2" - name: Install tox @@ -82,13 +82,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.7" - name: Set pip cache (Linux) - uses: actions/cache@v2 + uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip @@ -106,13 +106,13 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.7" - name: Set pip cache (Linux) - uses: actions/cache@v2 + uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') with: path: ~/.cache/pip @@ -132,9 +132,9 @@ jobs: if: ${{ github.ref=='refs/heads/master' && github.event_name!='pull_request' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: "3.7" - name: Check release @@ -144,9 +144,10 @@ jobs: pip install poetry pip install githubrelease pip install --pre autopub - echo "##[set-output name=release;]$(autopub check)" + autopub check + continue-on-error: true - name: Publish - if: ${{ steps.check_release.outputs.release=='' }} + if: steps.check_release.outcome=='success' env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} From 6d11c6f2e5d2086cefc7c1917c71e2f3899f72b8 Mon Sep 17 00:00:00 2001 From: Deniz Turgut Date: Thu, 20 Oct 2022 02:59:04 +0300 Subject: [PATCH 2/3] use python 3.9 for lint, docs and deploy actions 3.7 is old and will soon be EOLed this also fixes flake8 + importlib-metadata issues --- .github/workflows/main.yml | 6 +++--- tox.ini | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 59d6c95c..c4f10faa 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -86,7 +86,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.9" - name: Set pip cache (Linux) uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') @@ -110,7 +110,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.9" - name: Set pip cache (Linux) uses: actions/cache@v3 if: startsWith(runner.os, 'Linux') @@ -136,7 +136,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v4 with: - python-version: "3.7" + python-version: "3.9" - name: Check release id: check_release run: | diff --git a/tox.ini b/tox.ini index 4bceced8..e50c5f67 100644 --- a/tox.ini +++ b/tox.ini @@ -17,7 +17,7 @@ commands = pytest -s --cov=pelican pelican [testenv:docs] -basepython = python3.7 +basepython = python3.9 deps = -rrequirements/docs.pip changedir = docs @@ -36,7 +36,7 @@ import-order-style = cryptography max-line-length = 88 [testenv:flake8] -basepython = python3.7 +basepython = python3.9 deps = -rrequirements/style.pip commands = From cdc90d5d07691e5d7d35c81badd0d27074f8451c Mon Sep 17 00:00:00 2001 From: Deniz Turgut Date: Sun, 23 Oct 2022 18:22:50 +0300 Subject: [PATCH 3/3] unpin flake8 and do not install pelican while checking installing pelican brings in markdown. flake8 and markdown have incompatible requirements for importlib-metadata. installing pelican is not required to run flake8. --- requirements/style.pip | 2 +- tox.ini | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/style.pip b/requirements/style.pip index fe4c25c4..90225d01 100644 --- a/requirements/style.pip +++ b/requirements/style.pip @@ -1,2 +1,2 @@ -flake8<4.0 +flake8 flake8-import-order diff --git a/tox.ini b/tox.ini index e50c5f67..a3be7529 100644 --- a/tox.ini +++ b/tox.ini @@ -37,6 +37,7 @@ max-line-length = 88 [testenv:flake8] basepython = python3.9 +skip_install = true deps = -rrequirements/style.pip commands =