Skip to content

Commit 3c97bbc

Browse files
authored
Implement the Pulse package (#1)
Implement the `Pulse` package
2 parents 0850165 + 2369cd0 commit 3c97bbc

File tree

27 files changed

+1140
-1
lines changed

27 files changed

+1140
-1
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: "🐛 Bug Report"
3+
about: Report a reproducible bug or regression.
4+
title: 'Bug: '
5+
labels: 'bug'
6+
7+
---
8+
9+
<!--
10+
Please provide a clear and concise description of what the bug is. Include
11+
screenshots if needed. Please test using the latest version of the relevant
12+
React packages to make sure your issue has not already been fixed.
13+
-->
14+
15+
Application version:
16+
17+
## Steps To Reproduce
18+
19+
1.
20+
2.
21+
22+
<!--
23+
Your bug will get fixed much faster if we can run your code and it doesn't
24+
have dependencies other than React. Issues without reproduction steps or
25+
code examples may be immediately closed as not actionable.
26+
-->
27+
28+
Link to code example:
29+
30+
<!--
31+
Please provide a CodeSandbox (https://codesandbox.io/s/new), a link to a
32+
repository on GitHub, or provide a minimal code example that reproduces the
33+
problem. You may provide a screenshot of the application if you think it is
34+
relevant to your bug report. Here are some tips for providing a minimal
35+
example: https://stackoverflow.com/help/mcve.
36+
-->
37+
38+
## The current behavior
39+
40+
41+
## The expected behavior
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: 🛠 Feature request
3+
about: If you have a feature request for the pulse, file it here.
4+
labels: 'type: enhancement'
5+
---
6+
7+
**Feature description**
8+
Clearly and concisely describe the feature.
9+
10+
**Describe the solution you'd like**
11+
A clear and concise description of what you want to happen.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## Bug description
2+
Clearly and concisely describe the problem.
3+
4+
## Solution description
5+
Describe your code changes in detail for reviewers. Explain the technical solution you have provided and how it fixes the issue case.
6+
7+
## Covered unit test cases
8+
- [x] yes
9+
- [x] no
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
## Feature description
2+
Clearly and concisely describe the feature.
3+
4+
## Solution description
5+
Describe your code changes in detail for reviewers.
6+
7+
## Areas affected and ensured
8+
List out the areas affected by your code changes.
9+
10+
## Covered unit test cases
11+
- [x] yes
12+
- [x] no

.github/dependabot.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: github-actions
9+
directory: /
10+
open-pull-requests-limit: 10
11+
schedule:
12+
interval: daily
13+
time: '07:00'
14+
timezone: Europe/Berlin
15+
16+
assignees:
17+
- ns-vasilev
18+
reviewers:
19+
- ns-vasilev
20+
21+
22+
- package-ecosystem: swift
23+
directory: /
24+
open-pull-requests-limit: 10
25+
schedule:
26+
interval: daily
27+
time: '07:00'
28+
timezone: Europe/Berlin
29+
30+
assignees:
31+
- ns-vasilev
32+
reviewers:
33+
- ns-vasilev
34+

.github/workflows/ci.yml

Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
name: "pulse"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- dev
8+
pull_request:
9+
paths:
10+
- '.swiftlint.yml'
11+
- ".github/workflows/**"
12+
- "Package.swift"
13+
- "Source/**"
14+
- "Tests/**"
15+
16+
jobs:
17+
SwiftLint:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v3
21+
- name: GitHub Action for SwiftLint
22+
uses: norio-nomura/[email protected]
23+
with:
24+
args: --strict
25+
env:
26+
DIFF_BASE: ${{ github.base_ref }}
27+
28+
macOS:
29+
name: ${{ matrix.name }}
30+
runs-on: ${{ matrix.runsOn }}
31+
env:
32+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
33+
timeout-minutes: 20
34+
strategy:
35+
fail-fast: false
36+
matrix:
37+
include:
38+
- xcode: "Xcode_16.1"
39+
runsOn: macOS-14
40+
name: "macOS 14, SPM 6.0.2 Test"
41+
steps:
42+
- uses: actions/checkout@v3
43+
- name: ${{ matrix.name }}
44+
run: xcodebuild test -scheme "pulse" -destination "platform=macOS" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
45+
- name: Upload test coverage reports to Codecov
46+
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
47+
with:
48+
scheme_name: Pulse
49+
filename: ${{ matrix.name }}
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
52+
iOS:
53+
name: ${{ matrix.name }}
54+
runs-on: ${{ matrix.runsOn }}
55+
env:
56+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
57+
timeout-minutes: 20
58+
strategy:
59+
fail-fast: false
60+
matrix:
61+
include:
62+
- destination: "OS=18.1,name=iPhone 16 Pro"
63+
name: "iOS 18.1"
64+
xcode: "Xcode_16.1"
65+
runsOn: macOS-14
66+
steps:
67+
- uses: actions/checkout@v4
68+
- name: ${{ matrix.name }}
69+
run: xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
70+
71+
tvOS:
72+
name: ${{ matrix.name }}
73+
runs-on: ${{ matrix.runsOn }}
74+
env:
75+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
76+
timeout-minutes: 20
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
include:
81+
- destination: "OS=18.1,name=Apple TV"
82+
name: "tvOS 18.1"
83+
xcode: "Xcode_16.1"
84+
runsOn: macOS-14
85+
steps:
86+
- uses: actions/checkout@v3
87+
- name: ${{ matrix.name }}
88+
run: xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
89+
- name: Upload test coverage reports to Codecov
90+
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
91+
with:
92+
scheme_name: Pulse
93+
filename: ${{ matrix.name }}
94+
token: ${{ secrets.CODECOV_TOKEN }}
95+
96+
watchOS:
97+
name: ${{ matrix.name }}
98+
runs-on: ${{ matrix.runsOn }}
99+
env:
100+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
101+
timeout-minutes: 20
102+
strategy:
103+
fail-fast: false
104+
matrix:
105+
include:
106+
- destination: "OS=11.1,name=Apple Watch Series 10 (46mm)"
107+
name: "watchOS 11.1"
108+
xcode: "Xcode_16.1"
109+
runsOn: macOS-14
110+
steps:
111+
- uses: actions/checkout@v3
112+
- name: ${{ matrix.name }}
113+
run: xcodebuild test -scheme "pulse" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
114+
- name: Upload test coverage reports to Codecov
115+
uses: space-code/oss-common-actions/.github/actions/upload_test_coverage_report@main
116+
with:
117+
scheme_name: Pulse
118+
filename: ${{ matrix.name }}
119+
token: ${{ secrets.CODECOV_TOKEN }}
120+
121+
spm:
122+
name: ${{ matrix.name }}
123+
runs-on: ${{ matrix.runsOn }}
124+
env:
125+
DEVELOPER_DIR: "/Applications/${{ matrix.xcode }}.app/Contents/Developer"
126+
timeout-minutes: 20
127+
strategy:
128+
fail-fast: false
129+
matrix:
130+
include:
131+
- name: "macOS 14, SPM 6.0.2 Test"
132+
xcode: "Xcode_16.1"
133+
runsOn: macOS-14
134+
steps:
135+
- uses: actions/checkout@v3
136+
- name: ${{ matrix.name }}
137+
run: swift build -c release
138+
139+
merge-test-reports:
140+
needs: [iOS, macOS, watchOS, tvOS]
141+
runs-on: macos-13
142+
steps:
143+
- name: Download artifacts
144+
uses: actions/download-artifact@v4
145+
with:
146+
path: test_output
147+
- run: xcrun xcresulttool merge test_output/**/*.xcresult --output-path test_output/final/final.xcresult
148+
- name: Upload Merged Artifact
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: MergedResult
152+
path: test_output/final
153+
154+
discover-typos:
155+
name: Discover Typos
156+
runs-on: macOS-13
157+
env:
158+
DEVELOPER_DIR: /Applications/Xcode_14.1.app/Contents/Developer
159+
steps:
160+
- uses: actions/checkout@v4
161+
- name: Discover typos
162+
run: |
163+
export PATH="$PATH:/Library/Frameworks/Python.framework/Versions/3.11/bin"
164+
python3 -m pip install --upgrade pip
165+
python3 -m pip install codespell
166+
codespell --ignore-words-list="hart,inout,msdos,sur" --skip="./.build/*,./.git/*"

.github/workflows/danger.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Danger
2+
3+
on:
4+
pull_request:
5+
types: [synchronize, opened, reopened, labeled, unlabeled, edited]
6+
7+
env:
8+
LC_CTYPE: en_US.UTF-8
9+
LANG: en_US.UTF-8
10+
11+
jobs:
12+
run-danger:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: ruby setup
16+
uses: ruby/setup-ruby@v1
17+
with:
18+
ruby-version: 3.1.4
19+
bundler-cache: true
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
- name: Setup gems
23+
run: |
24+
gem install bundler
25+
bundle install --clean --path vendor/bundle
26+
- name: danger
27+
env:
28+
29+
DANGER_GITHUB_API_TOKEN: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
30+
31+
run: bundle exec danger --verbose

.swiftformat

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Stream rules
2+
3+
--swiftversion 5.3
4+
5+
# Use 'swiftformat --options' to list all of the possible options
6+
7+
--header "\npulse\nCopyright © {created.year} Space Code. All rights reserved.\n//"
8+
9+
--enable blankLinesBetweenScopes
10+
--enable blankLinesAtStartOfScope
11+
--enable blankLinesAtEndOfScope
12+
--enable blankLinesAroundMark
13+
--enable anyObjectProtocol
14+
--enable consecutiveBlankLines
15+
--enable consecutiveSpaces
16+
--enable duplicateImports
17+
--enable elseOnSameLine
18+
--enable emptyBraces
19+
--enable initCoderUnavailable
20+
--enable leadingDelimiters
21+
--enable numberFormatting
22+
--enable preferKeyPath
23+
--enable redundantBreak
24+
--enable redundantExtensionACL
25+
--enable redundantFileprivate
26+
--enable redundantGet
27+
--enable redundantInit
28+
--enable redundantLet
29+
--enable redundantLetError
30+
--enable redundantNilInit
31+
--enable redundantObjc
32+
--enable redundantParens
33+
--enable redundantPattern
34+
--enable redundantRawValues
35+
--enable redundantReturn
36+
--enable redundantSelf
37+
--enable redundantVoidReturnType
38+
--enable semicolons
39+
--enable sortImports
40+
--enable sortSwitchCases
41+
--enable spaceAroundBraces
42+
--enable spaceAroundBrackets
43+
--enable spaceAroundComments
44+
--enable spaceAroundGenerics
45+
--enable spaceAroundOperators
46+
--enable spaceInsideBraces
47+
--enable spaceInsideBrackets
48+
--enable spaceInsideComments
49+
--enable spaceInsideGenerics
50+
--enable spaceInsideParens
51+
--enable strongOutlets
52+
--enable strongifiedSelf
53+
--enable todos
54+
--enable trailingClosures
55+
--enable unusedArguments
56+
--enable void
57+
--enable markTypes
58+
--enable isEmpty
59+
60+
# format options
61+
62+
--wraparguments before-first
63+
--wrapcollections before-first
64+
--maxwidth 140

0 commit comments

Comments
 (0)