diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..e580fd7 --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,62 @@ +name: linting + +on: + push: + pull_request: + +jobs: + linting-requirements-install: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.7", "3.8", "3.9", "3.10" ] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: install linting requirements + run: | + pip install --upgrade pip + pip install flake8 pylint + + - name: Install project requirements + run: pip install -r requirements.txt + + - name: Lint with flake8 + run: flake8 certbot_dns_porkbun --count --select=E9,F63,F7,F82 --show-source --statistics + + - name: Lint with pylint + run: pylint certbot_dns_porkbun -d C,R,W + + linting-setup-install: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.7", "3.8", "3.9", "3.10" ] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: install linting requirements + run: | + pip install --upgrade pip + pip install flake8 pylint + + - name: Install project + run: pip install . + + - name: Lint with flake8 + run: flake8 certbot_dns_porkbun --count --select=E9,F63,F7,F82 --show-source --statistics + + - name: Lint with pylint + run: pylint certbot_dns_porkbun -d C,R,W diff --git a/.github/workflows/pypi-build-test.yml b/.github/workflows/pypi-build-test.yml new file mode 100644 index 0000000..41e169d --- /dev/null +++ b/.github/workflows/pypi-build-test.yml @@ -0,0 +1,69 @@ +name: pypi build test + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + linting-setup-install: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [ "3.7", "3.8", "3.9", "3.10" ] + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + + - name: install linting requirements + run: | + pip install --upgrade pip + pip install flake8 pylint + + - name: Install project + run: pip install . + + - name: Lint with flake8 + run: flake8 certbot_dns_porkbun --count --select=E9,F63,F7,F82 --show-source --statistics + + - name: Lint with pylint + run: pylint certbot_dns_porkbun -d C,R,W + + build: + name: Build distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Python 3.7 + uses: actions/setup-python@v3.1.2 + with: + python-version: 3.7 + + - name: Install pep517 + run: >- + python -m + pip install + pep517 + --user + + - name: Build a binary wheel and a source tarball + run: >- + python -m + pep517.build + --source + --binary + --out-dir dist/ + . + + - name: Upload distribution artifact for other jobs + uses: actions/upload-artifact@v3 + with: + name: certbot_dns_porkbun_dist + path: dist/ diff --git a/.github/workflows/pypi-publish-release.yml b/.github/workflows/pypi-publish-release.yml index 0277104..8f1466b 100644 --- a/.github/workflows/pypi-publish-release.yml +++ b/.github/workflows/pypi-publish-release.yml @@ -12,10 +12,10 @@ jobs: steps: - uses: actions/checkout@v3 - - name: Set up Python 3.6 + - name: Set up Python 3.7 uses: actions/setup-python@v4.0.0 with: - python-version: 3.6 + python-version: 3.7 - name: Install pep517 run: >- diff --git a/Readme.md b/Readme.md index b13d406..d61b13b 100644 --- a/Readme.md +++ b/Readme.md @@ -9,11 +9,12 @@ Plugin for certbot to obtain certificates using a DNS TXT record for Porkbun dom [![PyPI](https://img.shields.io/pypi/v/certbot_dns_porkbun?style=for-the-badge)](https://pypi.org/project/certbot-dns-porkbun/) ![PyPI - Downloads](https://img.shields.io/pypi/dm/certbot_dns_porkbun?style=for-the-badge) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/infinityofspace/certbot_dns_porkbun/pypi%20release?style=for-the-badge) +![GitHub Workflow Status](https://img.shields.io/github/workflow/status/infinityofspace/certbot_dns_porkbun/pypi%20build%20test?style=for-the-badge) [![Docker Image Version (latest semver)](https://img.shields.io/docker/v/infinityofspace/certbot_dns_porkbun?style=for-the-badge&sort=semver&label=Docker)](https://hub.docker.com/r/infinityofspace/certbot_dns_porkbun) -![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/infinityofspace/certbot_dns_porkbun?style=for-the-badge&sort=semver) -![GitHub Workflow Status](https://img.shields.io/github/workflow/status/infinityofspace/certbot_dns_porkbun/docker%20release?style=for-the-badge) +![Docker Pulls](https://img.shields.io/docker/pulls/infinityofspace/certbot_dns_porkbun?style=for-the-badge) +![Docker Image Size (tag)](https://img.shields.io/docker/image-size/infinityofspace/certbot_dns_porkbun/latest?style=for-the-badge) +[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/infinityofspace/certbot_dns_porkbun/docker%20unstable?style=for-the-badge)](https://github.com/infinityofspace/certbot_dns_porkbun/actions/workflows/docker-publish-unstable.yml) [![certbot-dns-porkbun](https://snapcraft.io/certbot-dns-porkbun/badge.svg)](https://snapcraft.io/certbot-dns-porkbun)