Skip to content

Commit 073c8f7

Browse files
committed
Initial commit: Health Generator App with comprehensive health data generation capabilities
0 parents  commit 073c8f7

File tree

92 files changed

+8889
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+8889
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Workflows Disabled
2+
3+
These GitHub Actions workflows have been temporarily disabled.
4+
5+
## Files in this directory:
6+
- `ci.yml` - Continuous Integration workflow
7+
- `codeql.yml` - CodeQL security analysis workflow
8+
- `release.yml` - Release automation workflow
9+
10+
## To re-enable workflows:
11+
12+
1. **Move files back to workflows directory:**
13+
```bash
14+
mv .github/workflows.disabled/*.yml .github/workflows/
15+
```
16+
17+
2. **Or rename this directory:**
18+
```bash
19+
mv .github/workflows.disabled .github/workflows
20+
```
21+
22+
## Note:
23+
24+
Before re-enabling, make sure to update the folder names in the workflows:
25+
- `HealthGeneratorApp``HealthKitDataGeneratorApp`
26+
- `HealthGeneratorApp.xcworkspace``HealthKitDataGeneratorApp.xcworkspace`
27+
- `-scheme HealthGeneratorApp``-scheme HealthKitDataGeneratorApp`
28+
29+
## Disabled on:
30+
October 5, 2025
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '0 8 * * 1' # Weekly on Mondays at 8 AM UTC
10+
11+
jobs:
12+
analyze:
13+
name: Analyze
14+
runs-on: macos-14
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
language: [ 'swift' ]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v4
28+
29+
- name: Initialize CodeQL
30+
uses: github/codeql-action/init@v2
31+
with:
32+
languages: ${{ matrix.language }}
33+
queries: security-extended,quality
34+
35+
- name: Select Xcode Version
36+
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
37+
38+
- name: Install Tuist
39+
run: |
40+
curl -Ls https://install.tuist.io | bash
41+
echo "$HOME/.tuist/bin" >> $GITHUB_PATH
42+
43+
- name: Generate and Build Project
44+
run: |
45+
cd HealthGeneratorApp
46+
tuist generate --no-open
47+
xcodebuild -workspace HealthGeneratorApp.xcworkspace \
48+
-scheme HealthGeneratorApp \
49+
-destination 'platform=iOS Simulator,name=iPhone 15,OS=17.0' \
50+
-configuration Debug \
51+
build \
52+
CODE_SIGNING_ALLOWED=NO
53+
54+
- name: Build Swift Package
55+
run: |
56+
cd HealthKitDataGenerator
57+
swift build
58+
59+
- name: Perform CodeQL Analysis
60+
uses: github/codeql-action/analyze@v2
61+
with:
62+
category: "/language:${{matrix.language}}"
Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
10+
11+
jobs:
12+
create-release:
13+
name: Create Release
14+
runs-on: macos-14
15+
permissions:
16+
contents: write
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
23+
- name: Select Xcode Version
24+
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
25+
26+
- name: Install Tuist
27+
run: |
28+
curl -Ls https://install.tuist.io | bash
29+
echo "$HOME/.tuist/bin" >> $GITHUB_PATH
30+
31+
- name: Generate Xcode Project
32+
run: |
33+
cd HealthGeneratorApp
34+
tuist generate --no-open
35+
36+
- name: Build and Archive iOS App
37+
run: |
38+
cd HealthGeneratorApp
39+
xcodebuild -workspace HealthGeneratorApp.xcworkspace \
40+
-scheme HealthGeneratorApp \
41+
-configuration Release \
42+
-destination 'generic/platform=iOS' \
43+
-archivePath build/HealthGeneratorApp.xcarchive \
44+
archive \
45+
CODE_SIGNING_ALLOWED=NO
46+
47+
- name: Build Swift Package
48+
run: |
49+
cd HealthKitDataGenerator
50+
swift build -c release
51+
52+
- name: Generate Changelog
53+
id: changelog
54+
run: |
55+
if [ -f CHANGELOG.md ]; then
56+
# Extract changelog for current version
57+
VERSION=${GITHUB_REF#refs/tags/}
58+
awk "/^## \[?${VERSION#v}/ { flag=1; next } /^## / { flag=0 } flag" CHANGELOG.md > current_changelog.txt
59+
if [ ! -s current_changelog.txt ]; then
60+
echo "No changelog found for version ${VERSION#v}, generating from commits..."
61+
git log --pretty=format:"- %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD > current_changelog.txt
62+
fi
63+
else
64+
echo "Generating changelog from recent commits..."
65+
git log --pretty=format:"- %s" --since="1 week ago" > current_changelog.txt
66+
fi
67+
68+
# Set output for GitHub release
69+
echo "CHANGELOG<<EOF" >> $GITHUB_OUTPUT
70+
cat current_changelog.txt >> $GITHUB_OUTPUT
71+
echo "EOF" >> $GITHUB_OUTPUT
72+
73+
- name: Create GitHub Release
74+
uses: actions/create-release@v1
75+
env:
76+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77+
with:
78+
tag_name: ${{ github.ref }}
79+
release_name: Release ${{ github.ref }}
80+
body: |
81+
## What's Changed
82+
83+
${{ steps.changelog.outputs.CHANGELOG }}
84+
85+
## Installation
86+
87+
### Swift Package Manager
88+
Add the following to your `Package.swift`:
89+
90+
```swift
91+
dependencies: [
92+
.package(url: "https://github.com/${{ github.repository }}", from: "${{ github.ref_name }}")
93+
]
94+
```
95+
96+
### iOS App
97+
Download the source code and follow the setup instructions in the README.
98+
draft: false
99+
prerelease: ${{ contains(github.ref, 'beta') || contains(github.ref, 'alpha') || contains(github.ref, 'rc') }}
100+
101+
publish-swift-package:
102+
name: Validate Swift Package
103+
runs-on: macos-14
104+
needs: create-release
105+
106+
steps:
107+
- uses: actions/checkout@v4
108+
109+
- name: Select Xcode Version
110+
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
111+
112+
- name: Validate Swift Package
113+
run: |
114+
cd HealthKitDataGenerator
115+
swift package resolve
116+
swift build -c release
117+
swift test -c release

.github/workflows/ci.yml

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, develop ]
6+
pull_request:
7+
branches: [ main, develop ]
8+
9+
env:
10+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
11+
12+
jobs:
13+
14+
test-swift-package:
15+
name: Test Swift Package
16+
runs-on: macos-14
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Select Xcode Version
22+
run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
23+
24+
- name: Setup Swift
25+
uses: SwiftyLab/setup-swift@latest
26+
27+
- name: Cache Swift Package Manager
28+
uses: actions/cache@v3
29+
with:
30+
path: .build
31+
key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }}
32+
restore-keys: |
33+
${{ runner.os }}-spm-
34+
35+
- name: Build Swift Package
36+
run: swift build -v
37+
38+
- name: Run Swift Package Tests
39+
run: swift test -v
40+
41+
# build-ios-app:
42+
# name: Build iOS App
43+
# runs-on: macos-14
44+
45+
# steps:
46+
# - uses: actions/checkout@v4
47+
48+
# - name: Select Xcode Version
49+
# run: sudo xcode-select -s /Applications/Xcode_15.0.app/Contents/Developer
50+
51+
# - name: Install Tuist
52+
# run: |
53+
# brew install tuist/tuist/tuist
54+
# echo "$(brew --prefix)/bin" >> $GITHUB_PATH
55+
56+
# - name: Cache Tuist
57+
# uses: actions/cache@v3
58+
# with:
59+
# path: |
60+
# ~/.tuist/Cache
61+
# ~/Library/Caches/tuist
62+
# key: ${{ runner.os }}-tuist-${{ hashFiles('**/Project.swift', '**/Tuist.swift') }}
63+
# restore-keys: |
64+
# ${{ runner.os }}-tuist-
65+
66+
# - name: Generate Xcode Project
67+
# run: |
68+
# cd HealthKitDataGeneratorApp
69+
# tuist generate --no-open
70+
71+
# - name: Build iOS App
72+
# run: |
73+
# cd HealthKitDataGeneratorApp
74+
# xcodebuild -workspace HealthKitDataGeneratorApp.xcworkspace \
75+
# -scheme HealthKitDataGeneratorApp \
76+
# -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=18.0' \
77+
# -configuration Debug \
78+
# build \
79+
# CODE_SIGNING_ALLOWED=NO
80+
81+
# - name: Run iOS App Tests
82+
# run: |
83+
# cd HealthKitDataGeneratorApp
84+
# xcodebuild -workspace HealthKitDataGeneratorApp.xcworkspace \
85+
# -scheme HealthKitDataGeneratorApp \
86+
# -destination 'platform=iOS Simulator,name=iPhone 15 Pro,OS=18.0' \
87+
# -configuration Debug \
88+
# test \
89+
# CODE_SIGNING_ALLOWED=NO
90+
91+
# lint:
92+
# name: SwiftLint
93+
# runs-on: macos-14
94+
95+
# steps:
96+
# - uses: actions/checkout@v4
97+
98+
# - name: Install SwiftLint
99+
# run: brew install swiftlint
100+
101+
# - name: Run SwiftLint
102+
# run: swiftlint lint --reporter github-actions-logging

0 commit comments

Comments
 (0)