Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/cd_pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
- name: Build and publish to PyPI
uses: JRubics/poetry-publish@v1.17
uses: JRubics/poetry-publish@b71e946be561eaf8bfb7562ecc97c26fb8583070 # v1.17
with:
pypi_token: ${{ secrets.PYPI_TOKEN }}
295 changes: 247 additions & 48 deletions .github/workflows/ci_prepare.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,252 @@
name: CI

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
linters:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Installing lint deps
run: |
pip install poetry
poetry config virtualenvs.create false
poetry install --with lint --with test --no-root
- name: Lint lib src
run: |
# stop the build if there are Python syntax errors or undefined names
ruff check .

unit-tests:
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry
poetry config virtualenvs.create false
poetry install --with test --no-root
- name: Run integration tests
run: poetry run pytest tests --cov
- name: Upload Codecov
uses: codecov/codecov-action@v3
lint:
name: Lint and Format Check
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: latest
virtualenvs-create: true
installer-parallel: true

- name: Add Poetry to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH

- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: cache
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Install dependencies
run: |
poetry install --with lint --no-root --no-interaction

- name: Run Ruff check
run: |
poetry run ruff check temporal_boost/ --output-format=github

- name: Run Ruff format check
run: |
poetry run ruff format --check temporal_boost/

- name: Run MyPy type checking
run: |
poetry run mypy temporal_boost/ || true

lint-examples:
name: Lint Examples
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: latest
virtualenvs-create: true
installer-parallel: true

- name: Add Poetry to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH

- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Install dependencies
run: |
poetry install --with lint --no-root --no-interaction

- name: Run Ruff check on examples
run: |
poetry run ruff check examples/ --output-format=github || true

- name: Run Ruff format check on examples
run: |
poetry run ruff format --check examples/ || true

test:
name: Unit Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]

steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
cache: "poetry"

- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
id: poetry
with:
version: latest
virtualenvs-create: true
installer-parallel: true

- name: Ensure Poetry is available
run: |
# Add Poetry to PATH
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
echo "${{ github.workspace }}" >> $GITHUB_PATH

# Check if Poetry is available
if ! command -v poetry >/dev/null 2>&1 && [ ! -f "$HOME/.local/bin/poetry" ] && [ ! -f "$HOME/.poetry/bin/poetry" ]; then
echo "Poetry not found, installing via official installer..."
curl -sSL https://install.python-poetry.org | python3 -
export PATH="$HOME/.local/bin:$PATH"
echo "$HOME/.local/bin" >> $GITHUB_PATH
fi

# Verify Poetry is available
poetry --version || $HOME/.local/bin/poetry --version || $HOME/.poetry/bin/poetry --version || exit 1
echo "Poetry installation verified"
shell: bash

- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
id: cache
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Install dependencies
run: |
poetry install --with test --no-root --no-interaction
env:
PATH: /usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$HOME/.poetry/bin:${{ github.workspace }}:$PATH

- name: Run tests with coverage
run: |
poetry run pytest tests/ --cov=temporal_boost --cov-report=xml --cov-report=term --cov-report=html -v
env:
PATH: /usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$HOME/.poetry/bin:${{ github.workspace }}:$PATH

- name: Upload coverage to Codecov
if: matrix.python-version == '3.11'
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4
with:
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false

- name: Upload coverage reports
if: matrix.python-version == '3.11'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: coverage-report-${{ matrix.python-version }}
path: htmlcov/
retention-days: 30

test-examples:
name: Test Examples
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5

- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: latest
virtualenvs-create: true
installer-parallel: true

- name: Add Poetry to PATH
run: |
echo "$HOME/.local/bin" >> $GITHUB_PATH
echo "$HOME/.poetry/bin" >> $GITHUB_PATH

- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Install dependencies
run: |
POETRY_BIN="$HOME/.local/bin/poetry"
if [ ! -f "$POETRY_BIN" ]; then
POETRY_BIN="poetry"
fi
"$POETRY_BIN" install --no-root --no-interaction --all-extras
shell: bash
env:
PATH: /usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$HOME/.poetry/bin

- name: Check example imports
run: |
POETRY_BIN="$HOME/.local/bin/poetry"
if [ ! -f "$POETRY_BIN" ]; then
POETRY_BIN="poetry"
fi
"$POETRY_BIN" run python -c "import examples.example_starter; import examples.example_app" || true
shell: bash
env:
PATH: /usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$HOME/.poetry/bin

- name: Verify example syntax
run: |
POETRY_BIN="$HOME/.local/bin/poetry"
if [ ! -f "$POETRY_BIN" ]; then
POETRY_BIN="poetry"
fi
"$POETRY_BIN" run python -m py_compile examples/*.py || true
shell: bash
env:
PATH: /usr/local/bin:/usr/bin:/bin:$HOME/.local/bin:$HOME/.poetry/bin
56 changes: 50 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,60 @@
name: Documentation deployment
name: Documentation Deployment

on:
push:
branches:
- main
paths:
- "docs/**"
- "mkdocs.yml"
- ".github/workflows/documentation.yml"

jobs:
deploy:
name: Build and Deploy Documentation
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- name: Checkout code
uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4

- name: Set up Python
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: "3.11"
cache: "poetry"

- name: Install Poetry
uses: snok/install-poetry@76e04a911780d5b312d89783f7b1cd627778900a # v1
with:
version: latest
virtualenvs-create: true
installer-parallel: true

- name: Add Poetry to PATH
run: echo "$HOME/.local/bin" >> $GITHUB_PATH

- name: Load cached Poetry dependencies
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
with:
path: ~/.cache/pypoetry
key: ${{ runner.os }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
${{ runner.os }}-poetry-

- name: Install documentation dependencies
run: |
poetry install --with docs --no-root --no-interaction

- name: Build documentation
run: |
poetry run mkdocs build --strict

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@e9c66a37f080288a11235e32cbe2dc5fb3a679cc # v4
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: northpowered.github.io
keep_files: false
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,6 @@ cython_debug/
!.vscode/launch.json
!.vscode/extensions.json
!.vscode/*.code-snippets

# Cursor
.cursor/
Loading
Loading