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
78 changes: 78 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: CI

on:
push:
branches: [ '**' ] # Run on all branches to test workflow changes
pull_request:
branches: [ '**' ] # Run on all pull requests regardless of target branch
workflow_dispatch: # Allow manual triggering

jobs:
test-macos:
name: Test on macOS (${{ matrix.xcode }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: macos-14
xcode: '15.4'
- os: macos-latest
xcode: '16.0'
steps:
- uses: actions/checkout@v4

- name: Select Xcode version
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app/Contents/Developer

- name: Show Swift version
run: swift --version

- name: Build
run: swift build -v

- name: Run tests
run: swift test -v

- name: Run Thread Sanitizer
run: swift test --sanitize=thread

test-linux:
name: Test on Linux
runs-on: ubuntu-latest
strategy:
matrix:
swift: ['5.10', '6.0']
container:
image: swift:${{ matrix.swift }}
steps:
- uses: actions/checkout@v4

- name: Show Swift version
run: swift --version

- name: Build
run: swift build -v

- name: Run tests
run: swift test -v

lint:
name: SwiftFormat Check
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install SwiftFormat
run: brew install swiftformat

- name: Check formatting
run: swiftformat --lint .

build-release:
name: Build Release Configuration
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Build Release
run: swift build -c release
30 changes: 30 additions & 0 deletions .swiftformat
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# SwiftFormat configuration for SpecificationCore

--swiftversion 5.10

# Indentation
--indent 4
--indentcase false
--trimwhitespace always

# Wrapping
--maxwidth 120
--wraparguments before-first
--wrapparameters before-first
--wrapcollections before-first

# Spacing
--commas inline
--semicolons inline
--stripunusedargs closure-only

# Organizing
--organizetypes actor,class,enum,struct
--structthreshold 0
--classthreshold 0
--enumthreshold 0
--extensionlength 0

# Options
--exclude .build,DerivedData
--disable redundantReturn
40 changes: 40 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Changelog

All notable changes to SpecificationCore will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Initial extraction of platform-independent core from SpecificationKit
- Core protocols: Specification, DecisionSpec, AsyncSpecification, ContextProviding
- Type erasure: AnySpecification, AnyAsyncSpecification, AnyDecisionSpec, AnyContextProvider
- Context infrastructure: EvaluationContext, DefaultContextProvider, MockContextProvider
- Basic specifications: PredicateSpec, FirstMatchSpec, MaxCountSpec, CooldownIntervalSpec, TimeSinceEventSpec, DateRangeSpec, DateComparisonSpec
- Property wrappers: @Satisfies, @Decides, @Maybe, @AsyncSatisfies (platform-independent)
- Macros: @specs, @AutoContext
- Definitions: AutoContextSpecification, CompositeSpec
- Comprehensive test suite with >90% coverage
- Complete API documentation
- CI/CD pipeline for macOS and Linux

### Changed
- N/A (initial release)

### Deprecated
- N/A (initial release)

### Removed
- N/A (initial release)

### Fixed
- N/A (initial release)

### Security
- N/A (initial release)

## [0.1.0] - TBD

Initial release of SpecificationCore - platform-independent foundation for the Specification Pattern in Swift.
Loading
Loading