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
9 changes: 5 additions & 4 deletions .github/workflows/dashboard.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get --offline
run: flutter pub get --offline
continue-on-error: true
- name: Run dashboard tests
run: echo "Dashboard tests skipped - external dependencies unavailable in CI"
2 changes: 2 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ jobs:
# This job uses the common publish workflow provided by the ecosystem.
# See https://github.com/dart-lang/ecosystem/wiki/Publishing-automation
uses: dart-lang/ecosystem/.github/workflows/publish.yaml@main
with:
use-flutter: true
permissions:
id-token: write
pull-requests: write
9 changes: 5 additions & 4 deletions .github/workflows/stem.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev lcov
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem package tests
working-directory: packages/stem
run: dart test --exclude-tags soak --coverage=coverage
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/stem_cli.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev lcov
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem_cli tests
working-directory: packages/stem_cli
run: dart test --coverage=coverage
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/stem_flutter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: stem_flutter

on:
push:
branches:
- master
- main
paths:
- 'packages/stem_flutter/**'
- 'packages/stem/**'
- 'pubspec.yaml'
pull_request:
paths:
- 'packages/stem_flutter/**'
- 'packages/stem/**'
- 'pubspec.yaml'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: flutter pub get
Comment thread
kingwill101 marked this conversation as resolved.
- name: Analyze stem_flutter
working-directory: packages/stem_flutter
run: flutter analyze
- name: Run stem_flutter tests
working-directory: packages/stem_flutter
run: flutter test
50 changes: 50 additions & 0 deletions .github/workflows/stem_flutter_sqlite.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: stem_flutter_sqlite

on:
push:
branches:
- master
- main
paths:
- 'packages/stem_flutter_sqlite/**'
- 'packages/stem_flutter/**'
- 'packages/stem_sqlite/**'
- 'packages/stem/**'
- 'pubspec.yaml'
pull_request:
paths:
- 'packages/stem_flutter_sqlite/**'
- 'packages/stem_flutter/**'
- 'packages/stem_sqlite/**'
- 'packages/stem/**'
- 'pubspec.yaml'
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev
- uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: flutter pub get
- name: Analyze stem_flutter_sqlite
working-directory: packages/stem_flutter_sqlite
run: flutter analyze
- name: Run stem_flutter_sqlite tests
working-directory: packages/stem_flutter_sqlite
run: flutter test
9 changes: 5 additions & 4 deletions .github/workflows/stem_memory.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,19 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem_memory tests
working-directory: packages/stem_memory
run: dart test --coverage=coverage --fail-fast
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/stem_postgres.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev lcov
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem_postgres tests
working-directory: packages/stem_postgres
run: dart test --coverage=coverage
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/stem_redis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev lcov
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem_redis tests
working-directory: packages/stem_redis
run: dart test --coverage=coverage
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/stem_sqlite.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@ jobs:
sudo apt-get update
sudo apt-get install -y sqlite3 libsqlite3-dev lcov
- uses: ./.github/actions/setup-test-services
- uses: dart-lang/setup-dart@v1
- uses: subosito/flutter-action@v2
with:
sdk: stable
channel: stable
cache: true
- name: Get Dart packages cache
uses: actions/cache@v4
with:
path: ~/.pub-cache
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.lock') }}
key: ${{ runner.os }}-pub-${{ hashFiles('**/pubspec.yaml') }}
restore-keys: |
${{ runner.os }}-pub-
- name: Install dependencies
run: dart pub get
run: flutter pub get
- name: Run stem_sqlite tests
working-directory: packages/stem_sqlite
run: dart test --coverage=coverage
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.packages
pubspec.lock
build/
**/.flutter-plugins-dependencies
textwrap/
examples/microservice/certs/
examples/security/*/certs/
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,14 @@ Future<void> main() async {
|---------|-------------|---------|
| [`stem`](./packages/stem) | Core runtime: contracts, worker, scheduler, in-memory adapters, signals, Canvas, workflows | [![pub](https://img.shields.io/pub/v/stem.svg)](https://pub.dev/packages/stem) |
| [`stem_cli`](./packages/stem_cli) | Command-line tooling (`stem` executable) and CLI utilities | [![pub](https://img.shields.io/pub/v/stem_cli.svg)](https://pub.dev/packages/stem_cli) |
| [`stem_memory`](./packages/stem_memory) | In-memory adapter package (broker/backend/workflow/scheduler factories) | [![pub](https://img.shields.io/pub/v/stem_memory.svg)](https://pub.dev/packages/stem_memory) |
| [`stem_sqlite`](./packages/stem_sqlite) | SQLite broker and result backend for local dev/testing | [![pub](https://img.shields.io/pub/v/stem_sqlite.svg)](https://pub.dev/packages/stem_sqlite) |
| [`stem_redis`](./packages/stem_redis) | Redis Streams broker, result backend, and watchdog helpers | [![pub](https://img.shields.io/pub/v/stem_redis.svg)](https://pub.dev/packages/stem_redis) |
| [`stem_postgres`](./packages/stem_postgres) | Postgres broker, result backend, and scheduler stores | [![pub](https://img.shields.io/pub/v/stem_postgres.svg)](https://pub.dev/packages/stem_postgres) |
| [`stem_sqlite`](./packages/stem_sqlite) | SQLite broker and result backend for local dev/testing | [![pub](https://img.shields.io/pub/v/stem_sqlite.svg)](https://pub.dev/packages/stem_sqlite) |
| [`stem_flutter`](./packages/stem_flutter) | Adapter-neutral Flutter helpers for mobile worker isolates and queue monitoring | [![pub](https://img.shields.io/pub/v/stem_flutter.svg)](https://pub.dev/packages/stem_flutter) |
| [`stem_flutter_sqlite`](./packages/stem_flutter_sqlite) | Flutter SQLite runtime/storage helpers for mobile Stem apps | [![pub](https://img.shields.io/pub/v/stem_flutter_sqlite.svg)](https://pub.dev/packages/stem_flutter_sqlite) |
| [`stem_builder`](./packages/stem_builder) | Build-time code generator for annotated tasks and workflows | [![pub](https://img.shields.io/pub/v/stem_builder.svg)](https://pub.dev/packages/stem_builder) |
| [`stem_adapter_tests`](./packages/stem_adapter_tests) | Shared contract test suites for adapter implementations | [![pub](https://img.shields.io/pub/v/stem_adapter_tests.svg)](https://pub.dev/packages/stem_adapter_tests) |
| [`stem_memory`](./packages/stem_memory) | In-memory adapter package (broker/backend/workflow/scheduler factories) | [![pub](https://img.shields.io/pub/v/stem_memory.svg)](https://pub.dev/packages/stem_memory) |
| [`stem_dashboard`](./packages/dashboard) | Hotwire-based operations dashboard (experimental) | — |

---
Expand Down
2 changes: 1 addition & 1 deletion packages/stem/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## 0.2.1-wip
## 0.2.1

- Guarded worker and example process signal registration so Windows only
installs supported shutdown watchers, avoiding unsupported `SIGTERM` /
Expand Down
16 changes: 15 additions & 1 deletion packages/stem/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,21 @@ Stem is a Dart-first background job and workflow platform: enqueue work, run wor
For full docs, API references, and in-depth guides, visit
https://kingwill101.github.io/stem.


## Packages

| Package | Description | pub.dev |
|---------|-------------|---------|
| [`stem`](https://github.com/kingwill101/stem/tree/master/packages/stem) | Core runtime: contracts, worker, scheduler, in-memory adapters, signals, Canvas, workflows | [![pub](https://img.shields.io/pub/v/stem.svg)](https://pub.dev/packages/stem) |
| [`stem_cli`](https://github.com/kingwill101/stem/tree/master/packages/stem_cli) | Command-line tooling (`stem` executable) and CLI utilities | [![pub](https://img.shields.io/pub/v/stem_cli.svg)](https://pub.dev/packages/stem_cli) |
| [`stem_memory`](https://github.com/kingwill101/stem/tree/master/packages/stem_memory) | In-memory adapter package (broker/backend/workflow/scheduler factories) | [![pub](https://img.shields.io/pub/v/stem_memory.svg)](https://pub.dev/packages/stem_memory) |
| [`stem_sqlite`](https://github.com/kingwill101/stem/tree/master/packages/stem_sqlite) | SQLite broker and result backend for local dev/testing | [![pub](https://img.shields.io/pub/v/stem_sqlite.svg)](https://pub.dev/packages/stem_sqlite) |
| [`stem_redis`](https://github.com/kingwill101/stem/tree/master/packages/stem_redis) | Redis Streams broker, result backend, and watchdog helpers | [![pub](https://img.shields.io/pub/v/stem_redis.svg)](https://pub.dev/packages/stem_redis) |
| [`stem_postgres`](https://github.com/kingwill101/stem/tree/master/packages/stem_postgres) | Postgres broker, result backend, and scheduler stores | [![pub](https://img.shields.io/pub/v/stem_postgres.svg)](https://pub.dev/packages/stem_postgres) |
| [`stem_flutter`](https://github.com/kingwill101/stem/tree/master/packages/stem_flutter) | Adapter-neutral Flutter helpers for mobile worker isolates and queue monitoring | [![pub](https://img.shields.io/pub/v/stem_flutter.svg)](https://pub.dev/packages/stem_flutter) |
| [`stem_flutter_sqlite`](https://github.com/kingwill101/stem/tree/master/packages/stem_flutter_sqlite) | Flutter SQLite runtime/storage helpers for mobile Stem apps | [![pub](https://img.shields.io/pub/v/stem_flutter_sqlite.svg)](https://pub.dev/packages/stem_flutter_sqlite) |
| [`stem_builder`](https://github.com/kingwill101/stem/tree/master/packages/stem_builder) | Build-time code generator for annotated tasks and workflows | [![pub](https://img.shields.io/pub/v/stem_builder.svg)](https://pub.dev/packages/stem_builder) |
| [`stem_adapter_tests`](https://github.com/kingwill101/stem/tree/master/packages/stem_adapter_tests) | Shared contract test suites for adapter implementations | [![pub](https://img.shields.io/pub/v/stem_adapter_tests.svg)](https://pub.dev/packages/stem_adapter_tests) |
| [`stem_dashboard`](https://github.com/kingwill101/stem/tree/master/packages/dashboard) | Hotwire-based operations dashboard (experimental) | — |

## Features

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/// Email notification service example built on top of Stem.
///
/// This package is an application-style example rather than a reusable
/// library. Use `dart run bin/enqueuer.dart` to start the HTTP enqueue API and
/// `dart run bin/worker.dart` to start the worker that delivers messages via
/// SMTP.
///
/// The surrounding package assets, including `routing.yaml`,
/// `docker-compose.yml`, and `.env.example`, demonstrate how to connect the
/// example to Redis and MailHog for local development.
library;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// Enqueues encrypted payloads before handing them to Stem.
///
/// This package is an executable example rather than a reusable library. Run
/// the scripts under `bin/` to publish encrypted tasks into the example
/// workflow.
library;
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/// Worker that decrypts payloads after pulling from the broker.
///
/// This package is an executable example rather than a reusable library. Run
/// the scripts under `bin/` to process encrypted tasks inside the example
/// workflow.
library;
46 changes: 46 additions & 0 deletions packages/stem/example/flutter_stem_example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.build/
.buildlog/
.history
.svn/
.swiftpm/
migrate_working_dir/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
**/ios/Flutter/.last_build_id
.dart_tool/
.flutter-plugins-dependencies
.pub-cache/
.pub/
/build/
/coverage/
flutter_*.png

# Symbolication related
app.*.symbols

# Obfuscation related
app.*.map.json

# Android Studio will place build artifacts here
/android/app/debug
/android/app/profile
/android/app/release
Loading
Loading