Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
742b03f
Migrate foundation to saltext package layout and modern workflow
jsandas Mar 29, 2026
c993411
Adopt copier-style pr/push/tag workflows with release gating
jsandas Mar 29, 2026
9972ee8
Add migration docs topics and link them in README and docs index
jsandas Mar 29, 2026
ad3a017
Add functional loader fixtures and fast state unit tests
jsandas Mar 29, 2026
0e46b1d
Fix Ruff lint config and roles state update logic
jsandas Mar 29, 2026
58e27c2
Ignore generated packaging artifacts
jsandas Mar 29, 2026
ddc4622
Use Python version matrix for tests job in CI workflows
jsandas Mar 29, 2026
bcf5889
add dependabot
jsandas Mar 29, 2026
fbf1513
Install package in changelog nox session for towncrier version import
jsandas Mar 29, 2026
eed5f83
Remove salt from tests extra; add tests-integration extra for integra…
jsandas Mar 29, 2026
9103cef
Add Sphinx autodoc API reference for all modules and states
jsandas Mar 29, 2026
edb847c
Ignore docs/_build output directory
jsandas Mar 29, 2026
c928abd
Remove legacy _modules, _states, _utils directories; use src/saltext/…
jsandas Mar 29, 2026
54ba0c2
Add fast unit tests for remaining state modules
jsandas Mar 29, 2026
b781a27
Migrate integration harness to package-based salt extension loading
jsandas Mar 29, 2026
0babeec
Add functional tests that execute state calls through salt loader
jsandas Mar 29, 2026
cbb2f36
Add pip Dependabot ecosystem; align docs with legacy layout removal
jsandas Mar 30, 2026
913cc38
Use pip-based extension loading in containers and clarify make target…
jsandas Mar 30, 2026
0c1cdfe
Consolidate pytest config into pyproject.toml
jsandas Mar 30, 2026
c7f82cf
Update Makefile
jsandas Mar 30, 2026
b5c9eea
Update noxfile.py
jsandas Mar 30, 2026
809ccf8
Normalize functional test indentation and formatting
jsandas Mar 30, 2026
8365268
Fix integration compose env resolution for NEXUS_PASSWORD
jsandas Mar 30, 2026
282e030
Update src/saltext/__init__.py
jsandas Mar 30, 2026
466b35e
Fix repository state message grammar and test assertion
jsandas Mar 30, 2026
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
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/.github/workflows"
schedule:
# Check for updates to GitHub Actions every month
interval: "monthly"

- package-ecosystem: "pip"
directory: "/"
schedule:
# Check for Python dependency updates every month
interval: "monthly"
17 changes: 0 additions & 17 deletions .github/workflows/integration.yaml

This file was deleted.

66 changes: 66 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: pr

on:
pull_request:
branches:
- master
- main

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev,tests]'

- name: Lint
run: nox -e lint

- name: Validate changelog
run: nox -e changelog

- name: Build package
run: python -m build --outdir dist

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

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

- name: Run tests
run: nox -s "tests-${{ matrix.python-version }}"

integration:
runs-on: ubuntu-latest
needs:
- quality
- tests
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Run integration tests
run: make integration clean
57 changes: 57 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: push

on:
push:
branches:
- master
- main

jobs:
quality:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev,tests,docs]'

- name: Lint
run: nox -e lint

- name: Validate changelog
run: nox -e changelog

- name: Build docs
run: nox -e docs

- name: Build package
run: python -m build --outdir dist

tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

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

- name: Run tests
run: nox -s "tests-${{ matrix.python-version }}"
90 changes: 90 additions & 0 deletions .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: tag

on:
push:
tags:
- "v*"
workflow_dispatch:
inputs:
tag:
description: "Tag to release (for example, v0.4.0)"
required: true
type: string

permissions:
contents: write
id-token: write

jobs:
verify:
if: github.event_name == 'push'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev,tests,docs]'

- name: Lint
run: nox -e lint

- name: Unit and functional tests
run: nox -s "tests-3.11"

- name: Build docs
run: nox -e docs

- name: Build package
run: python -m build --outdir dist

- name: Upload release artifacts
uses: actions/upload-artifact@v4
with:
name: release-artifacts
path: |
dist/*
docs/_build/html/**

release:
if: github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- name: Validate tag format
run: |
case "${{ github.event.inputs.tag }}" in
v*) ;;
*) echo "Tag must start with 'v'"; exit 1 ;;
esac

- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -e '.[dev,tests,docs]'

- name: Rebuild package for release
run: python -m build --outdir dist

- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.event.inputs.tag }}
files: |
dist/*
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ __pycache__
*.pyc
*.log
.vagrant
.env
.env
*.egg-info/
*.egg
build/
dist/
docs/_build/
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.14.0
hooks:
- id: ruff
args: ["--fix"]
- id: ruff-format
41 changes: 37 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
PASSWORD=$$(docker exec nexus3 bash -c 'cat /nexus-data/admin.password')
COMPOSE_FILE=docker-compose.yml

.PHONY: start start_nexus stop integration reload clean shell docs docs-check set-version
.PHONY: start start_nexus stop integration reload clean shell docs docs-check docs-sphinx set-version test test-integration lint format changelog-draft sync-src

start: start_nexus
@docker compose --progress quiet pull
@docker compose up -d
@echo "==> target=start COMPOSE_FILE=$(COMPOSE_FILE)"
@docker compose --progress quiet -f $(COMPOSE_FILE) pull
@docker compose -f $(COMPOSE_FILE) up -d

@sleep 5
@echo " installing package in salt containers..."
@docker exec salt-master sh -c 'python3 -m pip install -e /workspace >/dev/null'
@docker exec salt-minion sh -c 'python3 -m pip install -e /workspace >/dev/null'
@docker restart salt-minion > /dev/null

@sleep 10
@echo " syncing files with minion..."
@docker exec salt-master sh -c 'salt \* saltutil.sync_all' > /dev/null 2>&1

start_nexus:
@echo "==> target=start_nexus COMPOSE_FILE=$(COMPOSE_FILE)"
@docker compose --progress quiet -f $(COMPOSE_FILE) pull
@docker compose -f $(COMPOSE_FILE) up -d nexus3

Expand All @@ -22,15 +30,31 @@ start_nexus:
@docker exec nexus3 bash -c 'cat /nexus-data/admin.password'
@echo
@echo "NEXUS_PASSWORD=$(PASSWORD)" > .env
@echo "NEXUS_PASSWORD=$(PASSWORD)" > $(dir $(COMPOSE_FILE)).env

stop:
@docker compose -f $(COMPOSE_FILE) stop

integration: clean
@echo "==> target=integration: invoking start with COMPOSE_FILE=tests/files/integration.yml"
@$(MAKE) COMPOSE_FILE=tests/files/integration.yml start
@docker exec -w /tests/integration salt-master ash -c 'pip install pytest; pytest ./'
@echo "==> target=integration: running pytest in salt-master"
@docker exec -w /tests/integration salt-master ash -c 'pip install pytest; pytest -c /workspace/pyproject.toml ./'
@echo "==> target=integration: invoking stop with COMPOSE_FILE=tests/files/integration.yml"
@$(MAKE) COMPOSE_FILE=tests/files/integration.yml stop

test:
@nox -e tests

test-integration:
@nox -e integration

lint:
@pre-commit run --all-files

format:
@ruff format src tests

reload:
@docker exec -it salt-master salt-key -D -y
@docker rm -f salt-minion
Expand All @@ -53,6 +77,15 @@ docs:
docs-check:
@python3 ./bin/generate_docs_from_docstrings.py --check

docs-sphinx:
@nox -e docs

changelog-draft:
@nox -e changelog

sync-src:
@python3 ./bin/sync_legacy_to_src.py

set-version:
@if [ -n "$(VERSION)" ]; then \
python3 ./bin/update_file_versions.py "$(VERSION)"; \
Expand Down
Loading
Loading