Skip to content

Commit

Permalink
Merge pull request #4 from roanutil/meta-improvements
Browse files Browse the repository at this point in the history
Meta improvements
  • Loading branch information
roanutil authored Nov 4, 2023
2 parents bfe83df + f73c2dd commit 12199a4
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 36 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,11 @@ jobs:
- uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true # optional (default = false)
linux-test:
runs-on: ubuntu-latest
environment: default

steps:
- uses: actions/checkout@v3
- name: Run Tests
run: swift test --parallel
78 changes: 44 additions & 34 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,57 @@

import PackageDescription

let package = Package(
name: "swift-filter",
products: [
.library(
name: "Filter",
targets: ["Filter"]
),
.library(
name: "FilterNSPredicate",
targets: ["FilterNSPredicate"]
),
.library(
name: "FilterClosure",
targets: ["FilterClosure"]
),
],
dependencies: [],
targets: [
.target(
name: "Filter",
dependencies: []
),
.testTarget(
name: "FilterClosureTests",
dependencies: ["FilterClosure"]
),
.testTarget(
name: "FilterNSPredicateTests",
dependencies: ["FilterNSPredicate"]
),
var products: [Product] = [
.library(
name: "Filter",
targets: ["Filter"]
),
.library(
name: "FilterClosure",
targets: ["FilterClosure"]
),
]

var targets: [Target] = [
.target(name: "Filter"),
.target(
name: "FilterClosure",
dependencies: [
"Filter",
]
),
.testTarget(
name: "FilterClosureTests",
dependencies: [
"FilterClosure",
]
),
]

#if !os(Linux) && !os(Windows)
products.append(.library(
name: "FilterNSPredicate",
targets: ["FilterNSPredicate"]
))

targets.append(contentsOf: [
.target(
name: "FilterNSPredicate",
dependencies: [
"Filter",
]
),
.target(
name: "FilterClosure",
.testTarget(
name: "FilterNSPredicateTests",
dependencies: [
"Filter",
"FilterNSPredicate",
]
),
]
])
#endif

let package = Package(
name: "swift-filter",
products: products,
targets: targets
)
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

[![CI](https://github.com/roanutil/swift-filter/actions/workflows/ci.yml/badge.svg)](https://github.com/roanutil/swift-filter/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/roanutil/swift-filter/branch/main/graph/badge.svg?token=86G7F92SM2)](https://codecov.io/gh/roanutil/swift-filter)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Froanutil%2FFilter%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/roanutil/swift-filter)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Froanutil%2FFilter%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/roanutil/swift-filter)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Froanutil%2Fswift-filter%2Fbadge%3Ftype%3Dswift-versions)](https://swiftpackageindex.com/roanutil/swift-filter)
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Froanutil%2Fswift-filter%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/roanutil/swift-filter)

Filter is a library that makes it easy to model filters in state and then create predicates from that state.

Expand Down

0 comments on commit 12199a4

Please sign in to comment.