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
56 changes: 23 additions & 33 deletions .github/workflows/VerifyChanges.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,19 @@ on:
branches: ["main"]

env:
XCODE_VERSION: 26.0.1
XCODE_VERSION: 26.3

jobs:
lint:
name: Lint
runs-on: macos-26
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: Select Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app
- name: Lint
run: |
Scripts/lint
run: Scripts/lint

build-and-test:
name: Build and Test (${{ matrix.platform }})
Expand All @@ -30,22 +29,14 @@ jobs:
fail-fast: false
matrix:
include:
# - platform: iOS
# xcode_destination: "platform=iOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.iPhone-16-Pro"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.iOS-26-0"
- platform: iOS
xcode_destination: "platform=iOS Simulator,name=iPhone 17 Pro"
- platform: macOS
xcode_destination: "platform=macOS,arch=arm64"
# simulator_device_type: ""
# simulator_runtime: ""
# - platform: tvOS
# xcode_destination: "platform=tvOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-TV-4K-3rd-generation-4K"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.tvOS-26-0"
# - platform: watchOS
# xcode_destination: "platform=watchOS Simulator,name=GitHub_Actions_Simulator"
# simulator_device_type: "com.apple.CoreSimulator.SimDeviceType.Apple-Watch-Series-10-46mm"
# simulator_runtime: "com.apple.CoreSimulator.SimRuntime.watchOS-26-0"
- platform: tvOS
xcode_destination: "platform=tvOS Simulator,name=Apple TV 4K (3rd generation)"
- platform: watchOS
xcode_destination: "platform=watchOS Simulator,name=Apple Watch Series 11 (46mm)"

env:
DEV_BUILDS: DevBuilds/Sources
Expand All @@ -58,36 +49,35 @@ jobs:

steps:
- name: Select Xcode ${{ env.XCODE_VERSION }}
run: sudo xcode-select -s /Applications/Xcode_${{ env.XCODE_VERSION }}.app
run: sudo xcode-select -s /Applications/Xcode_"$XCODE_VERSION".app

- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Checkout DevBuilds
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
repository: DevKitOrganization/DevBuilds
path: DevBuilds

- name: Restore XCTestProducts
if: github.event_name != 'push'
id: cache-xctestproducts-restore
uses: actions/cache/restore@v4
uses: actions/cache/restore@v5
with:
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
key: cache-xctestproducts-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}

- uses: irgaly/xcode-cache@v1
if: steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
with:
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-${{ env.XCODE_VERSION }}-${{ github.sha }}
key: xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-${{ github.sha }}
restore-keys: |
xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.platform }}-
xcode-cache-deriveddata-
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}-${{ github.workflow }}-${{ matrix.platform }}-
xcode-cache-deriveddata-${{ env.XCODE_VERSION }}
deriveddata-directory: .build/DerivedData
sourcepackages-directory: .build/DerivedData/SourcePackages
swiftpm-package-resolved-file: Package.resolved
verbose: true

- name: Build for Testing
id: build-for-testing
Expand All @@ -100,8 +90,8 @@ jobs:
run: ${{ env.DEV_BUILDS }}/build_and_test.sh --action test-without-building

- name: Save XCTestProducts
if: failure() && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
if: (cancelled() || failure()) && steps.cache-xctestproducts-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v5
with:
path: ${{ env.XCODE_TEST_PRODUCTS_PATH }}
key: ${{ steps.cache-xctestproducts-restore.outputs.cache-primary-key }}
Expand All @@ -124,7 +114,7 @@ jobs:

- name: Upload Logs and XCResults
if: success() || failure()
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: Logs_and_XCResults-${{ matrix.platform }}
path: |
Expand All @@ -134,7 +124,7 @@ jobs:

- name: Upload xccovPretty output
if: github.event_name != 'push'
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: xccovPrettyOutput-${{ matrix.platform }}
path: .build/xccovPretty-${{ matrix.platform }}.output
Expand All @@ -150,7 +140,7 @@ jobs:

steps:
- name: Download xccovPretty output
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: xccovPrettyOutput-macOS

Expand Down
4 changes: 2 additions & 2 deletions .swift-format
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@
"ReplaceForEachWithForLoop": true,
"ReturnVoidInsteadOfEmptyTuple": true,
"TypeNamesShouldBeCapitalized": true,
"UseEarlyExits": true,
"UseEarlyExits": false,
"UseExplicitNilCheckInConditions": true,
"UseLetInEveryBoundCaseVariable": true,
"UseShorthandTypeNames": true,
"UseSingleLinePropertyGetter": true,
"UseSynthesizedInitializer": true,
"UseTripleSlashForDocumentationComments": true,
"UseWhereClausesInForLoops": true,
"UseWhereClausesInForLoops": false,
"ValidateDocumentationComments": false
},
"spacesAroundRangeFormationOperators": true,
Expand Down
38 changes: 32 additions & 6 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,9 @@ The repository uses GitHub Actions for CI/CD with the workflow in
`.github/workflows/VerifyChanges.yaml`. The workflow:

- Lints code on PRs using `swift format`
- Builds and tests on macOS only (iOS, tvOS, and watchOS builds disabled due to poor
stability and performance in GitHub Actions)
- Builds and tests on iOS, macOS, tvOS, and watchOS
- Generates code coverage reports using xccovPretty
- Requires Xcode 16.4 and macOS 15 runners

**Note**: For comprehensive cross-platform testing, use `Scripts/test-all-platforms` locally
or the pre-push git hook which runs all platform tests before pushing.
- Uses Xcode 26.3 and macOS 26 runners


## Architecture Overview
Expand Down Expand Up @@ -214,6 +210,36 @@ Follow the project's Markdown Style Guide:
- **Terminology**: Use "function" over "method", "type" over "class"


## Code Formatting and Spacing

The project follows strict spacing conventions for readability and consistency:

- **2 blank lines between major sections** including:
- Between the last property declaration and first function declaration
- Between all function/computed property implementations at the same scope level
- Between top-level type declarations (class, struct, enum, protocol, extension)
- Before MARK comments that separate major sections
- **1 blank line** for minor separations:
- Between property declarations and nested type definitions
- Between all function definitions in protocols
- After headers in documentation
- After MARK comments that separate major sections
- **File endings**: All Swift files must end with exactly one blank line


## Documentation Style

When writing Markdown documentation, reference `@Documentation/MarkdownStyleGuide.md` to
ensure consistent formatting, structure, and style across all project documentation. Key
standards:

- **Line Length**: 100 characters maximum
- **Code Blocks**: Use 4-space indentation instead of fenced blocks
- **Lists**: Use `-` for bullets with proper indentation alignment
- **Spacing**: 2 blank lines between major sections, 1 blank line after headers
- **Terminology**: Use "function" over "method", "type" over "class"


## Development Notes

- Follows Swift API Design Guidelines
Expand Down
3 changes: 1 addition & 2 deletions Documentation/MarkdownStyleGuide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Markdown Style Guide

This document defines the Markdown formatting standards for documentation in the Shopper iOS
codebase.
This document defines the Markdown formatting standards for documentation in this project.


## General Formatting
Expand Down
Loading
Loading