aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/deploy.yml53
-rw-r--r--.github/workflows/manual_deploy.yml30
-rw-r--r--.github/workflows/process.yml35
-rw-r--r--.github/workflows/tox.yml88
4 files changed, 206 insertions, 0 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
new file mode 100644
index 0000000..fca5318
--- /dev/null
+++ b/.github/workflows/deploy.yml
@@ -0,0 +1,53 @@
+name: deploy
+
+on:
+ push:
+ tags:
+ - '*'
+
+jobs:
+
+ pypi:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools wheel
+ - name: Build
+ run: |
+ python setup.py bdist_wheel sdist --formats gztar
+ - name: Publish
+ if: success()
+ uses: pypa/gh-action-pypi-publish@v1.1.0
+ with:
+ user: __token__
+ password: ${{ secrets.PYPI_PASSWORD }}
+
+ ghpages:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools
+ python -m pip install -r doc-requirements.txt
+ - name: Build
+ run: |
+ python -m mkdocs build --clean --verbose
+ - name: Publish
+ if: success()
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ deploy_key: ${{ secrets.PAGES_DEPLOY_KEY }}
+ external_repository: Python-Markdown/Python-Markdown.github.io
+ publish_branch: master
+ publish_dir: ./site
diff --git a/.github/workflows/manual_deploy.yml b/.github/workflows/manual_deploy.yml
new file mode 100644
index 0000000..b2ce06b
--- /dev/null
+++ b/.github/workflows/manual_deploy.yml
@@ -0,0 +1,30 @@
+name: manual deploy
+
+on:
+ workflow_dispatch
+
+jobs:
+
+ ghpages:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v1
+ with:
+ python-version: 3.7
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip setuptools
+ python -m pip install -r doc-requirements.txt
+ - name: Build
+ run: |
+ python -m mkdocs build --clean --verbose
+ - name: Publish
+ if: success()
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ deploy_key: ${{ secrets.PAGES_DEPLOY_KEY }}
+ external_repository: Python-Markdown/Python-Markdown.github.io
+ publish_branch: master
+ publish_dir: ./site
diff --git a/.github/workflows/process.yml b/.github/workflows/process.yml
new file mode 100644
index 0000000..d6d4c94
--- /dev/null
+++ b/.github/workflows/process.yml
@@ -0,0 +1,35 @@
+name: bot
+
+on:
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ require_changelog:
+
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: mskelton/changelog-reminder-action@v1
+ with:
+ # Match any file in the docs/change_log/ dir.
+ changelogRegex: "docs/change_log/.*"
+ # Only require changelog update if changes were made in markdown/
+ include: "markdown/.*"
+ message: |
+ @${{ github.actor }}, thank you for your contribution. It appears that you have not added a comment to the
+ change log describing the changes you have made. Doing so will help to ensure your contribution is accepted.
+
+ Please see the [Contributing Guide](https://python-markdown.github.io/contributing/#pull-requests) for details.
+
+ markdown-link-check:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+ - uses: gaurav-nelson/github-action-markdown-link-check@v1
+ with:
+ use-quiet-mode: yes
+ use-verbose-mode: yes
+ check-modified-files-only: yes
+ base-branch: master
diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml
new file mode 100644
index 0000000..e2004ad
--- /dev/null
+++ b/.github/workflows/tox.yml
@@ -0,0 +1,88 @@
+# This workflow will install dependencies and run tests/linters with a matrix of tox environments.
+
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ tags:
+ - '**'
+ pull_request:
+ branches:
+ - '**'
+
+jobs:
+ test:
+
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ max-parallel: 4
+ matrix:
+ tox-env: [py37, py38, py39, py310, pypy37, pypy38, pypy39, pygments]
+ include:
+ - tox-env: py37
+ python-version: '3.7'
+ - tox-env: py38
+ python-version: '3.8'
+ - tox-env: py39
+ python-version: '3.9'
+ - tox-env: py310
+ python-version: '3.10'
+ - tox-env: pypy37
+ python-version: pypy-3.7
+ - tox-env: pypy38
+ python-version: pypy-3.8
+ - tox-env: pypy39
+ python-version: pypy-3.9
+ - tox-env: pygments
+ python-version: '3.7'
+
+ env:
+ TOXENV: ${{ matrix.tox-env }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python ${{ matrix.python-version }}
+ uses: actions/setup-python@v3
+ with:
+ python-version: ${{ matrix.python-version }}
+ - name: Install dependencies
+ run: |
+ sudo apt-get install libtidy-dev
+ python -m pip install --upgrade pip tox coverage codecov
+ - name: Run tox
+ run: python -m tox
+ - name: Upload Results
+ if: success()
+ uses: codecov/codecov-action@v1
+ with:
+ file: ./coverage.xml
+ flags: unittests
+ name: ${{ matrix.tox-env }}
+ fail_ci_if_error: false
+
+ lint:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ max-parallel: 4
+ matrix:
+ tox-env: [flake8, pep517check, checkspelling]
+
+ env:
+ TOXENV: ${{ matrix.tox-env }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - name: Setup Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: 3.7
+ - name: Install dependencies
+ run: |
+ python -m pip install --upgrade pip tox
+ if [[ "$TOXENV" == 'checkspelling' ]]; then sudo apt-get install aspell aspell-en; fi
+ - name: Run tox
+ run: python -m tox