Tests #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_run: | |
workflows: ["Auto Increment Version"] # Ensures this runs after Version Increment | |
types: | |
- completed | |
jobs: | |
# pre-commit Checks | |
pre-commit: | |
name: Pre Commit Checks | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file | |
- name: Run Pre Commit Checks | |
uses: pre-commit/action@v3.0.1 | |
# Run Test Coverage | |
test-coverage: | |
needs: [ pre-commit ] | |
name: Test Coverage (Python ${{ matrix.python-version }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- '3.10' | |
- '3.11' | |
- '3.12' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Redis | |
uses: shogo82148/actions-setup-redis@v1 | |
with: | |
redis-version: "latest" | |
- name: Verify Redis is Running | |
run: redis-cli ping | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install Tox and Other Packages | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade tox tox-gh-actions | |
- name: Run Tox | |
run: tox -v | |
# PyPi Build Test | |
pypi-build-test: | |
needs: [ test-coverage ] | |
name: PyPi Build Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version-file: 'pyproject.toml' # Read the Python version from the pyproject.toml file | |
- name: Install Build Tools | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade build | |
python -m pip install --upgrade setuptools wheel | |
- name: Package Build | |
env: | |
STACKMANAGER_VERSION: 9999 | |
run: | | |
python -m build | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: build-${{ github.event_name }}-${{ github.sha }} | |
path: dist | |
if-no-files-found: ignore |