Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into grpc-support
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Oct 22, 2023
2 parents d69c733 + 32b6e52 commit 80471d0
Show file tree
Hide file tree
Showing 68 changed files with 2,546 additions and 1,304 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: michaelboulton
68 changes: 52 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"

- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.in') }}
restore-keys: |
${{ runner.os }}-pip-
python-version: "3.11"

- uses: pre-commit/[email protected]

test:
unit-tests:
runs-on: ubuntu-latest
needs: simple-checks

Expand All @@ -45,6 +38,49 @@ jobs:
- TOXENV: py3
TOXCFG: tox.ini

env:
TOXENV: ${{ matrix.TOXENV }}
TOXCFG: ${{ matrix.TOXCFG }}

steps:
- uses: actions/checkout@v3

- uses: actions/cache@v3
env:
cache-name: cache-${{ matrix.TOXENV }}
with:
path: .tox
key: ${{ runner.os }}-tox-${{ env.cache-name }}-${{ hashFiles('pyproject.toml', 'requirements.in') }}

- uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml', 'requirements.in') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"

- name: install deps
run: |
pip install tox -c constraints.txt
- name: tox
run: |
tox -c ${TOXCFG} -e ${TOXENV}
integration-tests:
runs-on: ubuntu-latest
needs: unit-tests

strategy:
fail-fast: false
matrix:
include:
# integration tests
- TOXENV: py3-generic
TOXCFG: tox-integration.ini
- TOXENV: py3-mqtt
Expand All @@ -65,14 +101,17 @@ jobs:
TOXCFG: ${{ matrix.TOXCFG }}

steps:
- uses: jpribyl/[email protected]
continue-on-error: true

- uses: actions/checkout@v3

- uses: actions/cache@v3
env:
cache-name: cache-${{ matrix.TOXENV }}
with:
path: .tox
key: ${{ runner.os }}-tox-${{ env.cache-name }}-${{ hashFiles('tox.ini', 'tox-integration.ini', 'pyproject.toml', 'requirements.in') }}
key: ${{ runner.os }}-tox-${{ env.cache-name }}-${{ hashFiles('pyproject.toml', 'requirements.in') }}

- uses: actions/cache@v3
with:
Expand All @@ -81,18 +120,15 @@ jobs:
restore-keys: |
${{ runner.os }}-pip-
- uses: jpribyl/[email protected]
continue-on-error: true

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- name: install deps
run: |
pip install tox-travis -c constraints.txt
pip install tox -c constraints.txt
- name: tox
run: |
tox -c ${TOXCFG}
tox -c ${TOXCFG} -e ${TOXENV}
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
repos:
- repo: https://github.com/ambv/black
rev: 23.1.0
rev: 23.7.0
hooks:
- id: black
files: "(tavern|tests)"
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.0.246"
rev: "v0.0.280"
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
rev: v3.0.0
hooks:
- id: prettier
types_or: [yaml]
Expand Down
19 changes: 19 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Read the Docs configuration file for Sphinx projects
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the OS, Python version and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.11"

# Build documentation in the "docs/" directory with Sphinx
sphinx:
configuration: docs/source/conf.py

python:
install:
- requirements: requirements.txt
18 changes: 14 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,6 @@ calling run() directly will now cause a pytest isntance to be run in the backgro

# 0.18.0 Add 'timeout' parameter for http requests (2018-08-24)

## show Bump version: 0.17.2 → 0.18.0 (2018-08-24)

## 0.18.1 Add content type/encoding to uploaded files (2018-09-05)

## 0.18.2 Fix formatting environment variables in command line global config files (2018-09-21)
Expand Down Expand Up @@ -261,8 +259,6 @@ The initial 2 hooks should allow a user to do something before every test and af

## 1.1.1 Travis fix (2020-05-23)

## travis-force Attempt to force travis to commit (2020-05-23)

## 1.1.2 fforce new verison to make travis actually commit (2020-05-23)

## 1.1.3 travis (2020-05-23)
Expand Down Expand Up @@ -408,3 +404,17 @@ This is technically not a operational change but I'm adding a new tag so it can
## 2.0.5 Attempt to fix deadlock in subscribe locks (2023-02-16)

## 2.0.6 Fix a few small MQTT issues (2023-03-13)

## 2.0.7 Lock pytest to <7.3 to fix issue with marks (2023-04-15)

# 2.1.0 Allow multi part file uploads with the same form field name (2023-06-04)

# 2.2.0 Allow wildcards in MQTT topics (2023-06-25)

## 2.2.1 Update some dependencies (2023-07-30)

# 2.3.0 Add 'finally' block (2023-08-05)

## 2.3.1 Fix error formatting when including files with curly braces (2023-09-18)

# 2.4.0 Allow using an ext function to create a URL (2023-09-18)
11 changes: 11 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Run every so often to update the pre-commit hooks
black tavern/ tests/
ruff --fix tavern/ tests/

### Fix yaml formatting issues

pre-commit run --all-files

## Creating a new release

1. Setup `~/.pypirc`
Expand All @@ -58,3 +62,10 @@ Run every so often to update the pre-commit hooks
1. Tag and push to git with `tbump <new-tag> --tag-message "<tag-message>"`

1. Upload to pypi with `flit publish`

## Building the documentation

```shell
mkdir -p dist/
sphinx-build docs/source/ dist/
```
Loading

0 comments on commit 80471d0

Please sign in to comment.