Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
72650a7
Use dedicated task for loading items list.
martinomamic Apr 16, 2025
7792d66
Merge pull request #29 from martinomamic/bugfix/cleanup-tasks
martinomamic Apr 16, 2025
35d71d1
Add TabBarFeature as a prerequisite for displaying favorites. Add res…
martinomamic Apr 16, 2025
6bd71d3
Remove unneccesary code
martinomamic Apr 16, 2025
8a45348
Revert "Remove unneccesary code"
martinomamic Apr 16, 2025
e51c53c
Merge pull request #31 from martinomamic/feature/tabbar
martinomamic Apr 16, 2025
f268a9d
Simplify TabbarFeature
martinomamic Apr 16, 2025
34797ad
Use system dependency for opening url
martinomamic Apr 16, 2025
e792f30
Use inline navigationTitleDisplayMode
martinomamic Apr 16, 2025
5c9c379
Remove duplicate NavigationStack
martinomamic Apr 16, 2025
cb3fe8c
Merge pull request #33 from martinomamic/feature/tabbar
martinomamic Apr 16, 2025
32183d4
Add isFavorite flag to feed objects and save them locally.
martinomamic Apr 16, 2025
c766890
Reuse feed list and sync between tabs
martinomamic Apr 16, 2025
de744e9
Merge pull request #34 from martinomamic/feature/favorites
martinomamic Apr 16, 2025
17e24d1
Potential fix
martinomamic Apr 16, 2025
290e7f5
Merge pull request #35 from martinomamic/bugfix/favorites-memory-leak
martinomamic Apr 16, 2025
9fe2681
Leverage SwiftData behavior to update feeds
martinomamic Apr 16, 2025
671c8b4
Merge pull request #36 from martinomamic/bugfix/favorite-toggle-delet…
martinomamic Apr 16, 2025
35ee768
Add app icon and accent color
martinomamic Apr 16, 2025
56794c0
Merge branch 'develop' into feature/set-app-icon-and-accent-color
martinomamic Apr 16, 2025
4bc250c
Merge pull request #37 from martinomamic/feature/set-app-icon-and-acc…
martinomamic Apr 16, 2025
33f188a
Separate CRUD more efficiently and modify consumers. Adapt the tests …
martinomamic Apr 17, 2025
b0222b3
Merge pull request #42 from martinomamic/feature/revisit-persistence-…
martinomamic Apr 17, 2025
f63cea9
Use the errors for edge cases. Reverse the loaded feeds, so the last …
martinomamic Apr 17, 2025
494d489
Comment on updating all feed properties
martinomamic Apr 17, 2025
b131109
Merge pull request #43 from martinomamic/feature/revisit-persistence-…
martinomamic Apr 17, 2025
ddcd297
Update models with notificationsEnabled flag
martinomamic Apr 17, 2025
6d5ae25
Start NotificationClient module
martinomamic Apr 17, 2025
54f5d59
Add dependencies to the package. Add logic for checking the feeds for…
martinomamic Apr 17, 2025
f76e02e
Add basic rss subscription functionality, using local notifications t…
martinomamic Apr 17, 2025
210ef6f
Add NotificationClientTests
martinomamic Apr 17, 2025
fe478a2
Add debug logic for the notifications
martinomamic Apr 18, 2025
4c62e69
Add models for loading from JSON
martinomamic Apr 18, 2025
35daa96
Add ExploreClient for loading the feeds from JSON
martinomamic Apr 18, 2025
b552f45
Finish Explore functionality, with indication which feeds are added t…
martinomamic Apr 18, 2025
1c228dd
Merge pull request #45 from martinomamic/feature/explore-feeds
martinomamic Apr 18, 2025
a70597b
Resolve conflicts, and remove duplicate feed links
martinomamic Apr 18, 2025
5daddf2
Modify notiifcation logic and test using the debug view, make the deb…
martinomamic Apr 18, 2025
a418758
Merge pull request #44 from martinomamic/feature/subscribe-and-notify…
martinomamic Apr 18, 2025
26923c6
Replace all magic numbers with named constants.
martinomamic Apr 18, 2025
b8ca16c
Add some previews
martinomamic Apr 18, 2025
d3a93cb
Fix wrong background modes permission. Remove test notifications whic…
martinomamic Apr 18, 2025
d67376f
Merge pull request #46 from martinomamic/task/cleanup-magic-numbers
martinomamic Apr 18, 2025
0b58327
Merge pull request #47 from martinomamic/task/add-previews
martinomamic Apr 18, 2025
ba1e771
Merge pull request #48 from martinomamic/bugfix/fix-notifications-ser…
martinomamic Apr 18, 2025
ba406c4
Add swiflint, Makefile and setup github actions.
martinomamic Apr 18, 2025
874c741
Exclude non project files
martinomamic Apr 18, 2025
8c37964
Run make lint-fix
martinomamic Apr 18, 2025
d369e57
Merge pull request #49 from martinomamic/feature/setup-ci
martinomamic Apr 18, 2025
97811ce
Fix for the github actions error
martinomamic Apr 18, 2025
8d6fb1e
Merge pull request #51 from martinomamic/feature/setup-ci
martinomamic Apr 18, 2025
8bd8f42
Remove all references to upload-artifact
martinomamic Apr 18, 2025
ccde632
Merge pull request #52 from martinomamic/feature/setup-ci
martinomamic Apr 18, 2025
0d6ff48
Resolve critical swiftlint issues
martinomamic Apr 18, 2025
a782aa0
Adapt swiflint.yml to ignore some non sensical rules in SwiftUI envir…
martinomamic Apr 19, 2025
011b145
Prepare for running all tests on CI and locally
martinomamic Apr 19, 2025
41ef150
Try upgrading the version. Log the used version
martinomamic Apr 19, 2025
05a0402
Try setting swift version
martinomamic Apr 19, 2025
30f6f1a
Set swift version to 5.10 and remove setting it in ci.yml
martinomamic Apr 19, 2025
1aeb4fb
Try to satisfy SPM by setting the macOS versioon in Package
martinomamic Apr 19, 2025
9bda778
Try to resolve availability issues
martinomamic Apr 19, 2025
c1b7133
Try to resolve availability issues by modifying the SwiftData relate…
martinomamic Apr 19, 2025
fb4e34d
Try to resolve availability issues by following the CI logs
martinomamic Apr 19, 2025
831bab1
MacOS conformance due to SPM, Remove unused import while at it.
martinomamic Apr 19, 2025
9e96b95
Add conformance to all files where persistenceClient is used. Maybe a…
martinomamic Apr 19, 2025
64dbb6b
Add conformance to all files
martinomamic Apr 19, 2025
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
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-and-test:
runs-on: macos-14

steps:
- uses: actions/checkout@v4

- name: Check Swift version
run: swift --version

- name: Install SwiftLint
run: brew install swiftlint

- name: Install Dependencies
run: make install-tools

- name: SwiftLint
run: make lint

- name: Build
run: make all

- name: Run tests
run: make test-all

- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: TestResults/
29 changes: 12 additions & 17 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@ timeline.xctimeline
playground.xcworkspace

# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/
.swiftpm/

# Since we're using SPM directly in Xcode
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
# .swiftpm

.build/

# CocoaPods
#
Expand All @@ -46,18 +40,19 @@ playground.xcworkspace
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# macOS
.DS_Store

# Test results
TestResults/

# Xcode state
*.xcuserstate
140 changes: 140 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
excluded:
- .build
- ./*.generated.swift
- Package.swift
- "**/Generated"
- "**/.build"
- "**/checkouts"
- "**/Package.swift"
- "./RSSReaderKit/.build"
- "./RSSReaderKit/Package.swift"
- "Dependencies"

disabled_rules:
- attributes # Disable attribute placement rules since we use SwiftUI style
- force_unwrapping # Disable in tests
- function_body_length # Tests can be longer
- type_body_length # Debug views can be longer
- line_length # Use warning instead of error

opt_in_rules:
- array_init
- closure_end_indentation
- closure_spacing
- collection_alignment
- contains_over_filter_count
- convenience_type
- empty_count
- empty_string
- explicit_init
- fatal_error_message
- first_where
- implicitly_unwrapped_optional
- last_where
- legacy_random
- literal_expression_end_indentation
- multiline_arguments
- multiline_function_chains
- multiline_literal_brackets
- multiline_parameters
- operator_usage_whitespace
- overridden_super_call
- private_action
- prohibited_super_call
- redundant_nil_coalescing
- redundant_type_annotation
- strict_fileprivate
- toggle_bool
- unowned_variable_capture
- vertical_parameter_alignment_on_call
- vertical_whitespace_closing_braces
- vertical_whitespace_opening_braces

analyzer_rules:
- unused_declaration
- unused_import

line_length:
warning: 120
error: 200
ignores_urls: true
ignores_comments: true
ignores_interpolated_strings: true

type_name:
min_length: 2
max_length: 50
excluded:
- UI
- ID

identifier_name:
min_length: 2
excluded:
- id
- up
- url
- dx
- dy
- x
- y

file_types:
test:
- "**/*Tests.swift"
preview:
- "**/*Preview.swift"
debug:
- "**/*Debug*.swift"

function_body_length:
warning: 60
error: 100
ignore_comment_only_lines: true

type_body_length:
warning: 250
error: 400
ignore_comment_only_lines: true

cyclomatic_complexity:
warning: 15
error: 20

function_parameter_count:
warning: 6
error: 8

trailing_whitespace:
ignores_empty_lines: true
ignores_comments: true

attributes:
always_on_same_line:
- "@IBAction"
- "@NSManaged"
- "@objc"
always_on_line_above:
- "@available"
- "@discardableResult"
- "@UIApplicationMain"
- "@Environment"
- "@State"
- "@Binding"
- "@ObservedObject"
- "@StateObject"
- "@Published"
- "@MainActor"

included:
- RSSReaderKit/Sources
- RSSReaderKit/Tests

custom_rules:
test_force_unwrap:
name: "Force Unwrap in Tests"
regex: "!"
match_kinds:
- forced_value
included: ".*Tests.swift"
severity: ignore
81 changes: 81 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
SWIFT_PACKAGE := swift package
SWIFT_BUILD := $(SWIFT_PACKAGE) build
SWIFT_TEST := $(SWIFT_PACKAGE) test
SWIFT_LINT := swiftlint
SWIFT_FORMAT := swift-format

PACKAGE_DIR = RSSReaderKit
SCHEME = RSSReader
TEST_PLAN = RSSReader
CONFIGURATION = Debug

.PHONY: all
all: package-build build

.PHONY: build
build:
xcodebuild \
-scheme $(SCHEME) \
-configuration $(CONFIGURATION) \
build

.PHONY: test
test:
xcodebuild \
-scheme $(SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIGURATION) \
-resultBundlePath TestResults/App \
test

.PHONY: lint
lint:
$(SWIFT_LINT) lint --config .swiftlint.yml

.PHONY: lint-fix
lint-fix:
$(SWIFT_LINT) --fix --config .swiftlint.yml

.PHONY: format
format:
$(SWIFT_FORMAT) format --in-place --recursive ./Sources ./Tests

.PHONY: clean
clean:
rm -rf build
rm -rf TestResults
cd $(PACKAGE_DIR) && swift package clean

.PHONY: xcodeproj
xcodeproj:
$(SWIFT_PACKAGE) generate-xcodeproj

.PHONY: install-tools
install-tools:
brew install swiftlint
brew install swift-format

.PHONY: package-build
package-build:
cd $(PACKAGE_DIR) && swift build

.PHONY: package-test
package-test:
cd $(PACKAGE_DIR) && swift test

.PHONY: test-all
test-all:
@echo "Running package tests..."
@cd $(PACKAGE_DIR) && swift test || (echo "❌ Package tests failed" && exit 1)
@echo "✅ Package tests passed"
@echo "Running app tests..."
@xcodebuild \
-scheme $(SCHEME) \
-testPlan $(TEST_PLAN) \
-configuration $(CONFIGURATION) \
-resultBundlePath TestResults/App \
test || (echo "❌ App tests failed" && exit 1)
@echo "✅ App tests passed"

.PHONY: ci
ci: test-all
24 changes: 0 additions & 24 deletions RSSClient.xctestplan

This file was deleted.

Loading
Loading