Skip to content

Bump sphinx from 7.0.1 to 7.1.0 #445

Bump sphinx from 7.0.1 to 7.1.0

Bump sphinx from 7.0.1 to 7.1.0 #445

Workflow file for this run

---
# Taken from pyhaversion
name: Actions
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: write
jobs:
changes:
runs-on: ubuntu-latest
outputs:
docfiles: ${{ steps.filter.outputs.docfiles }}
steps:
- uses: actions/[email protected]
- uses: dorny/[email protected]
id: filter
with:
filters: |
docfiles:
- 'pysmsboxnet/*.py'
- 'docs/**'
- 'requirements_doc.txt'
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/[email protected]
- name: πŸ›  Set up Python 3
uses: actions/[email protected]
id: python
with:
python-version: 3.x
cache: pip
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
check-latest: true
- name: πŸ“¦ Install dependencies in virtual env
run: |
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements_lint.txt
pip install -e .
- name: πŸ–€ Lint with Black
run: venv/bin/black pysmsboxnet tests --check
- name: πŸ–€ Lint with Flake8
run: venv/bin/flake8 pysmsboxnet tests
- name: Pre-commit cache
uses: actions/[email protected]
with:
path: ~/.cache/pre-commit
key: "${{ runner.os }}-pc-${{ hashFiles('.pre-commit-config.yaml') }}"
restore-keys: |
${{ runner.os }}-pre-commit-
- name: "Run pre-commits"
run: venv/bin/pre-commit run --all-files
test:
name: Test with Python ${{ matrix.python-version }}
needs: lint
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/[email protected]
- name: πŸ› οΈ Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
check-latest: true
- name: πŸ“¦ Install dependencies
run: pip3 install -r requirements_test.txt
- name: πŸƒ Run tests
run: pytest tests
- name: Run code coverage
if: ${{ matrix.python-version == '3.10' }}
run: pytest --cov=./pysmsboxnet --cov-report=xml tests
- name: upload to codecov
if: ${{ matrix.python-version == '3.10' }}
uses: codecov/[email protected]
test_install:
name: Test installing with Python ${{ matrix.python-version }}
needs: test
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10", 3.11]
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/[email protected]
- name: πŸ› οΈ Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
check-latest: true
- name: Install using pip
run: pip3 install .
- name: Try example in /tmp
env:
SMSBOX_API_KEY: ${{ secrets.SMSBOX_API_KEY }}
run: |
mkdir -p /tmp/test_example
cp example.py /tmp/test_example
cd /tmp/test_example
python3 /tmp/test_example/example.py
cd -
rm -rf /tmp/test_example
test_build:
name: Test building with Python 3
needs: test_install
runs-on: ubuntu-latest
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/[email protected]
- name: πŸ› οΈ Set up Python 3
uses: actions/[email protected]
with:
python-version: 3.x
cache: pip
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
check-latest: true
- name: Install build
run: pip3 install build
- name: Run build
run: python3 -m build
deploy_doc:
if: github.event_name == 'push' && needs.changes.outputs.docfiles == 'true'
needs: [test_build, changes]
runs-on: ubuntu-latest
name: Build and deploydocumentation from main
steps:
- name: πŸ“₯ Checkout the repository
uses: actions/[email protected]
with:
fetch-depth: 0
- name: πŸ›  Set up Python3
uses: actions/[email protected]
id: python
with:
python-version: "3.10"
cache: pip
cache-dependency-path: |
**/requirements*.txt
pyproject.toml
check-latest: true
- name: πŸ“¦ Install dependencies
run: |
pip3 install --upgrade pip
pip3 install -r requirements_doc.txt
pip3 install -e .
- name: Build documentation using sphinx
run: make -C docs html
- name: deploy documentation
uses: JamesIves/[email protected]
with:
folder: docs/_build/html
target-folder: dev