Skip to content

Commit

Permalink
Merge pull request #1 from MFB-Technologies-Inc/feature/initial-release
Browse files Browse the repository at this point in the history
Feature/initial release
  • Loading branch information
r-jarvis authored Feb 15, 2024
2 parents 8663820 + 7f6862a commit b7e0259
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: ci

on:
push:
branches:
- main
pull_request:
branches:
- '*'
workflow_dispatch:

jobs:
lint:
runs-on: macos-14
environment: default
steps:
- uses: actions/checkout@v3
- name: SwiftFormat version
run: swiftformat --version
- name: Format lint
run: swiftformat --lint .
- name: Install SwiftLint
run: brew install swiftlint
- name: SwiftLint version
run: swiftlint --version
- name: Lint
run: swiftlint lint --quiet
macos-test:
runs-on: macos-14
environment: default
strategy:
matrix:
xcode: ['14.3.1', '15.2']
# Swift: 5.8.1 , 5.9.2
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run Tests
run: swift test --enable-code-coverage --parallel
- name: Swift Coverage Report
run: xcrun llvm-cov export -format="lcov" .build/debug/secret-swiftPackageTests.xctest/Contents/MacOS/secret-swiftPackageTests -instr-profile .build/debug/codecov/default.profdata > coverage_report.lcov
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
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
5 changes: 5 additions & 0 deletions Sources/Secret/Hashed.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public struct Hashed<T>: Hashable where T: Hashable {
/// Enabled by default, when encoding, replace the ``wrappedValue`` with its hash.
public let obscureEncoding: Bool

public init(wrappedValue: T, obscureEncoding: Bool = true) {
self.wrappedValue = wrappedValue
self.obscureEncoding = obscureEncoding
}

public init(_ wrappedValue: T, obscureEncoding: Bool = true) {
self.wrappedValue = wrappedValue
self.obscureEncoding = obscureEncoding
Expand Down
5 changes: 5 additions & 0 deletions Sources/Secret/Redacted.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ public struct Redacted<T> {
/// Enabled by default, when encoding, replace the ``wrappedValue`` with "REDACTED".
public let obscureEncoding: Bool

public init(wrappedValue: T, obscureEncoding: Bool = true) {
self.wrappedValue = wrappedValue
self.obscureEncoding = obscureEncoding
}

public init(_ wrappedValue: T, obscureEncoding: Bool = true) {
self.wrappedValue = wrappedValue
self.obscureEncoding = obscureEncoding
Expand Down

0 comments on commit b7e0259

Please sign in to comment.