Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
5e30e72
move to make file and upstream python
gtmanfred Apr 26, 2019
0b6c293
remove dockerfile
gtmanfred Apr 26, 2019
842da40
ok to fail on develop salt as well
gtmanfred Apr 26, 2019
045b5a8
try azure-pipelines
gtmanfred Apr 26, 2019
1a6503a
try docker?
gtmanfred Apr 26, 2019
d06040a
do not allocate tty
gtmanfred Apr 26, 2019
fa34f9f
install sshd if it is not available
gtmanfred Apr 29, 2019
2a86c43
fix install extra packages in makefile
gtmanfred May 1, 2019
68dcf01
clean up output
gtmanfred May 1, 2019
2961676
yay a test was fixed
gtmanfred May 1, 2019
f15ce58
strip -rc from PYTHON for tox env
gtmanfred May 1, 2019
7d7b178
Merge pull request #189 from gtmanfred/develop
gtmanfred May 1, 2019
98c35fc
build matrix
gtmanfred May 3, 2019
ac87e4b
remove debugging stuff
gtmanfred May 3, 2019
1890753
Merge pull request #193 from gtmanfred/develop
gtmanfred May 16, 2019
566249b
Use gssapi instead of the aged kerberos package
simmel Apr 11, 2019
6b2f2f2
Avoid password prompt when using eauth=kerberos
simmel Apr 11, 2019
6ccb0c8
eauth=kerberos is not noopt
simmel Nov 26, 2019
79604c5
Add setup.py extras
simmel Nov 27, 2019
8096e08
Merge pull request #199 from stockholmuniversity/replace_kerberos_wit…
mattp- Feb 6, 2020
a83fc07
Update python and salt versions in tox.ini
barneysowood Jan 19, 2023
e7d7bd9
Update coverage version to current
barneysowood Jan 19, 2023
29b0313
Add GH Actions workflow
barneysowood Jan 19, 2023
b28888c
Add GH Actions workflow for flake8
barneysowood Jan 19, 2023
d3c6c18
Add exclusion for master and py3.5/3.6
barneysowood Jan 19, 2023
6f897d9
Run tox without -vv
barneysowood Jan 19, 2023
acce4f6
Update pytest-salt url
barneysowood Jan 19, 2023
1c1aca7
Update requirements to match current salt
barneysowood Jan 19, 2023
e4afa37
Removed scheduled run of flake8
barneysowood Jan 20, 2023
ec53778
Drop testing of python 3.5 and 3.6
barneysowood Mar 16, 2023
e59dd58
Update testing requirements
barneysowood Apr 18, 2023
53cc63f
Update tox.ini to use new pytest options
barneysowood Apr 18, 2023
952bf25
Update fixtures to use pytest-salt-factories
barneysowood Apr 18, 2023
96484be
Update client integration tests
barneysowood Apr 18, 2023
1bbe77a
Update vanilla integration tests for new pytest
barneysowood Apr 18, 2023
d51f725
Fix jinja 3.1 issue
barneysowood Apr 18, 2023
7588e21
Enable all netapi clients
barneysowood Apr 18, 2023
369b5a1
Use importlib-metadata<5.0.0 on older python/salt
barneysowood Apr 18, 2023
b376591
Merge pull request #226 from barneysowood/tests-github-actions
barneysowood May 1, 2023
578f1ba
Merge pull request #227 from barneysowood/fix-test-suite
barneysowood May 1, 2023
16eaf32
Add Salt 3006.0 and py3.9/py3.10
barneysowood May 1, 2023
912b898
Exclude py3.10 for 3004.2 and 3005.1
barneysowood May 1, 2023
cd9caba
Pin salt versions correctly
barneysowood May 1, 2023
2421a43
Use importlib-meatdata<5.0.0 for all versions
barneysowood May 1, 2023
8ab18e8
Merge pull request #229 from barneysowood/tests-3600.0
barneysowood May 3, 2023
f57b89a
update actions version matrix
nicholasmhughes Nov 3, 2023
e911b29
update tox version matrix
nicholasmhughes Nov 3, 2023
d4db751
set requirements to ensure compatibility
Nov 29, 2023
1745485
Update to use 3006.5
barneysowood Jan 24, 2024
a3a2eff
Migrate away from pkg_resources
tacerus Feb 10, 2024
c720efd
Update salt and python versions to test against
barneysowood Feb 19, 2025
38a0fe1
Update requirements for pytest-salt-factories
barneysowood Feb 19, 2025
31bf9e8
Update GH action runners to use ubuntu-24.04
barneysowood Feb 19, 2025
dc0448a
Add missing remove_stale_minion_key helper
barneysowood Feb 19, 2025
f8fac83
Update to use 22.04 due to ssh issues
barneysowood Feb 20, 2025
0e96a66
Merge pull request #242 from barneysowood/231-fix-python-versions-act…
barneysowood Feb 20, 2025
18b5c64
Merge branch 'develop' into importlib
barneysowood Feb 20, 2025
fcdb1fb
Merge pull request #236 from tacerus/importlib
barneysowood Feb 20, 2025
35fb306
Convert tox to nox
Feb 8, 2024
69afe50
Update files with pre-commit
Feb 8, 2024
620f0f0
Add flake8 requirement
Feb 8, 2024
2c90b94
Update salt-rewrite to saltstack version
barneysowood Mar 18, 2025
6f4ad49
Pin version of nox for flake8 to 2024.10.09
barneysowood Mar 18, 2025
996fc29
Add back support for testing against salt master
barneysowood Mar 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/flake8.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: flake8 lint
on:
push:
pull_request:

jobs:
flake8-lint:
runs-on: ubuntu-24.04
name: flake8 lint
steps:
- name: Setup python for flake8
uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: actions/checkout@v3
- name: Install nox
run: python -m pip install nox==2024.10.09
- name: Setup flake8
run: nox --force-color -e flake8 --install-only
- name: Run flake8
run: nox --force-color -e flake8 -vv
90 changes: 90 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: test
on:
workflow_dispatch:
push:
pull_request:
schedule:
- cron: "0 8 * * *"

jobs:
pre-commit:
name: pre-commit
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
pre-commit install
- name: Run pre-commit
run: pre-commit run --all-files

test:
name: test ${{ matrix.py }} - ${{ matrix.netapi }} - ${{ matrix.salt }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
py:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
netapi:
- "cherrypy"
- "tornado"
salt:
- "v3006.9"
- "v3007.1"
- "master"
exclude:
- py: "3.8"
salt: "v3007.1"
- py: "3.9"
salt: "v3007.1"
- py: "3.8"
salt: "master"
- py: "3.9"
salt: "master"
env:
SALT_REQUIREMENT: ${{ matrix.salt == 'master' && 'salt@git+https://github.com/saltstack/salt.git@master' || format('salt=={0}', matrix.salt) }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.py }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py }}

- name: Install setuptools_scm
run: python -m pip install setuptools_scm

- name: Install dependencies
run: sudo apt update && sudo apt install -y libc6-dev libffi-dev gcc git openssh-server libzmq3-dev
env:
DEBIAN_FRONTEND: noninteractive

- name: Install Nox
run: |
python -m pip install --upgrade pip
pip install nox

- name: Install Test Requirements
env:
PYTHON_VERSIONS: ${{ matrix.py }}
API_BACKEND: ${{ matrix.netapi }}
run: |
nox --force-color -e tests --install-only

- name: Test
env:
PYTHON_VERSIONS: ${{ matrix.py }}
API_BACKEND: ${{ matrix.netapi }}
SKIP_REQUIREMENTS_INSTALL: YES
run: |
nox --force-color -e tests -- -vv tests/
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
MANIFEST
dist/
salt_pepper.egg-info/
.tox/
.nox/
artifacts/
64 changes: 64 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
minimum_pre_commit_version: 3.5.0
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: trailing-whitespace # Trims trailing whitespace.
args: [--markdown-linebreak-ext=md]
- id: mixed-line-ending # Replaces or checks mixed line ending.
args: [--fix=lf]
- id: end-of-file-fixer # Makes sure files end in a newline and only a newline.
- id: check-merge-conflict # Check for files that contain merge conflict strings.
- id: check-ast # Simply check whether files parse as valid python.

# ----- Formatting ---------------------------------------------------------------------------->
- repo: https://github.com/myint/autoflake
rev: v2.2.1
hooks:
- id: autoflake
name: Remove unused variables and imports
language: python
args: ["--in-place", "--remove-all-unused-imports", "--remove-unused-variables", "--expand-star-imports"]
files: \.py$

- repo: https://github.com/saltstack/pre-commit-remove-import-headers
rev: 1.1.0
hooks:
- id: remove-import-headers

- repo: https://github.com/saltstack/salt-rewrite
# Automatically rewrite code with known rules
rev: 2.5.2
hooks:
- id: salt-rewrite
alias: rewrite-tests
name: Rewrite the test suite
files: ^tests/.*\.py$
args: [--silent, -E, fix_docstrings]

- repo: https://github.com/asottile/pyupgrade
rev: v3.15.0
hooks:
- id: pyupgrade
name: Rewrite Code to be Py3+
args: [
--py3-plus
]

- repo: https://github.com/asottile/reorder_python_imports
rev: v3.12.0
hooks:
- id: reorder-python-imports
args: [
--py3-plus,
]

- repo: https://github.com/psf/black
rev: 23.12.1
hooks:
- id: black
args: [-l 100]

# <---- Formatting -----------------------------------------------------------------------------
32 changes: 17 additions & 15 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
dist: xenial
sudo: false
services:
- docker
language: python
cache: pip
services:
- docker

before_install:
- pyenv versions
- pyenv version-name
- env

install:
- pip install tox

Expand All @@ -19,21 +14,28 @@ python:
- '3.4'
- '3.5'
- '3.6'
- '3.7-dev'
- '3.7'
- '3.8-dev'

env:
- SALT=-v2018.3 BACKEND=-cherrypy CODECOV=py
- SALT=-v2018.3 BACKEND=-tornado CODECOV=py
- SALT=-v2019.2 BACKEND=-cherrypy CODECOV=py
- SALT=-v2019.2 BACKEND=-tornado CODECOV=py
- SALT=v2018.3 BACKEND=cherrypy
- SALT=v2018.3 BACKEND=tornado
- SALT=v2019.2 BACKEND=cherrypy
- SALT=v2019.2 BACKEND=tornado
- SALT=develop BACKEND=cherrypy
- SALT=develop BACKEND=tornado

matrix:
env:
allow_failures:
- python: '3.8-dev'
- env: SALT=develop BACKEND=tornado
- env: SALT=develop BACKEND=cherrypy

script:
- PYTHON="${TRAVIS_PYTHON_VERSION%-dev}"
- docker run -v $PWD:/pepper -ti --rm gtmanfred/pepper:latest tox -c /pepper/tox.ini -e "${TRAVIS_PYTHON_VERSION%%.*}flake8,${CODECOV}${PYTHON//./}${BACKEND}${SALT}"
- PYTHON="${TRAVIS_PYTHON_VERSION/-dev/-rc}"
- TOX_VERSION="py${PYTHON//./}"
- docker run -v $PWD:/pepper -ti --rm "python:$PYTHON" make -C /pepper test PYVERSION="${TOX_VERSION%-rc}" SALT="${SALT}" BACKEND="${BACKEND}"

after_success:
- sudo chown $USER .tox/
- if [[ $CODECOV == "py" ]]; then tox -e codecov; fi
- tox -e codecov
1 change: 0 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

11 changes: 11 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
PYVERSION?=py37
SALT?=v2019.2
BACKEND?=cherrypy
DEBIAN_FRONTEND=noninteractive

install:
apt update && apt install -y libc6-dev libffi-dev gcc git openssh-server libzmq3-dev
pip install tox

test: install
tox -e flake8,$(PYVERSION)-$(BACKEND)-$(SALT)
6 changes: 3 additions & 3 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ Examples leveraging the runner client.
Configuration
-------------

You can configure pepper through the command line, using environment variables
or in a configuration file ``$HOME/.pepperrc`` with the following syntax :
You can configure pepper through the command line, using environment variables
or in a configuration file ``$HOME/.pepperrc`` with the following syntax :

.. code-block::
.. code-block::

[main]
SALTAPI_URL=https://localhost:8000/
Expand Down
60 changes: 60 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
trigger:
- develop

variables:
python: '["py2.7", "py3.4", "py3.5", "py3.6", "py3.7", "py3.8"]'
salt: '["v2018.3", "v2019.2", "develop"]'
backends: '["cherrypy", "tornado"]'

jobs:
- job: build_matrix
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.7'
architecture: x64

- task: PythonScript@0
name: matrix
inputs:
scriptSource: Inline
script: |
import json
matrix = {}
for pyver in $(python):
for saltver in $(salt):
for backend in $(backends):
matrix['{0}-{1}-{2}'.format(pyver, backend, saltver)] = {
'python.version': pyver[2:],
'version': pyver.replace('.', ''),
'salt': saltver,
'backend': backend,
}
print('##vso[task.setvariable variable=matrix;isOutput=true]{0}'.format(json.dumps(matrix)))

- job: test_pepper
dependsOn: build_matrix
pool:
vmImage: 'Ubuntu-16.04'
strategy:
matrix: $[ dependencies.build_matrix.outputs['matrix.matrix'] ]
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: x64

- script: |
pip install tox
displayName: Install dependencies
- script: |
docker run -v $PWD:/pepper --rm "python:$(python.version)" make -C /pepper test PYTHON_VERSION=$(version) SALT=$(salt) BACKEND=$(backend)
displayName: pytest
- script: |
sudo chown $USER .tox/
tox -e codecov
displayName: codecov
env:
CODECOV_TOKEN: '16c2a232-4329-438c-b163-ccbfeeab47aa'
1 change: 0 additions & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,3 @@ comment:
layout: "header, diff"
behavior: default
require_changes: no

Loading
Loading