-
Notifications
You must be signed in to change notification settings - Fork 0
Nikola/cleanup+ci iterating #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
088d1cb
Cleanup PR template
4136daa
wip
16b9d7a
Add badges to readme
ca6efc3
Remove doc generating and leave that for later
c9583e7
Downgrade xcode so its available on the runners
2c4acd0
wip
d1a32c7
wip
f21d7a3
wip
b80b006
wip
af4f31b
Simplify test jobs
5085714
Address AI bot remarks
da1ffce
wip
c418cda
wip
2b5cb93
wip
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "swift" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| time: "09:00" | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - "dependencies" | ||
| - "swift" | ||
| commit-message: | ||
| prefix: "chore" | ||
| include: "scope" | ||
|
|
||
| - package-ecosystem: "github-actions" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: "monday" | ||
| time: "09:00" | ||
| open-pull-requests-limit: 5 | ||
| labels: | ||
| - "github-actions" | ||
| - "dependencies" | ||
| commit-message: | ||
| prefix: "ci" | ||
| include: "scope" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| name: CI | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ main ] | ||
| pull_request: | ||
| branches: [ main ] | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test | ||
| runs-on: macos-14 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Select Xcode Version | ||
| run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer | ||
|
|
||
| - name: Show Swift Version | ||
| run: swift --version | ||
|
|
||
| - name: Show Xcode Version | ||
| run: xcodebuild -version | ||
|
|
||
| - name: Cache Swift Package Manager | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/Library/Caches/org.swift.swiftpm/ | ||
| ~/.cache/org.swift.swiftpm/ | ||
| key: ${{ runner.os }}-spm-${{ hashFiles('**/Package.resolved') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-spm- | ||
|
|
||
| - name: Resolve Dependencies | ||
| run: swift package resolve | ||
|
|
||
| - name: Build | ||
| run: swift build --verbose | ||
|
|
||
| - name: Test | ||
| run: swift test --verbose --enable-code-coverage --parallel | ||
| env: | ||
| SWIFTUI_DEBUG_SCAN_VERBOSE: "1" | ||
|
|
||
| - name: Generate Code Coverage | ||
| run: | | ||
| # Find the actual test executable (SPM naming can vary) | ||
| TEST_EXECUTABLE=$(find .build/debug -name "*PackageTests.xctest" -type d | head -1) | ||
| if [ -z "$TEST_EXECUTABLE" ]; then | ||
| echo "No test executable found, skipping coverage" | ||
| exit 0 | ||
| fi | ||
|
|
||
| EXECUTABLE_NAME=$(basename "$TEST_EXECUTABLE" .xctest) | ||
| EXECUTABLE_PATH="$TEST_EXECUTABLE/Contents/MacOS/$EXECUTABLE_NAME" | ||
|
|
||
| if [ ! -f "$EXECUTABLE_PATH" ]; then | ||
| echo "Test executable not found at $EXECUTABLE_PATH, skipping coverage" | ||
| exit 0 | ||
| fi | ||
|
|
||
| xcrun llvm-cov export \ | ||
| "$EXECUTABLE_PATH" \ | ||
| -instr-profile .build/debug/codecov/default.profdata \ | ||
| -format="lcov" > coverage.lcov | ||
|
|
||
| - name: Upload Code Coverage | ||
| if: hashFiles('coverage.lcov') != '' | ||
| uses: codecov/codecov-action@v4 | ||
| with: | ||
| file: coverage.lcov | ||
| fail_ci_if_error: false | ||
| verbose: true | ||
|
|
||
| validate: | ||
| name: Package Validation | ||
| runs-on: macos-14 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Select Xcode Version | ||
| run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer | ||
|
|
||
| - name: Swift Package Validation | ||
| run: | | ||
| echo "=== Validating Package.swift syntax ===" | ||
| swift package dump-package > /dev/null | ||
|
|
||
| echo "=== Resolving dependencies ===" | ||
| swift package resolve | ||
|
|
||
| echo "=== Showing dependency tree ===" | ||
| swift package show-dependencies | ||
|
|
||
| echo "β Package validation completed successfully" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| name: Release | ||
|
|
||
| on: | ||
| push: | ||
| tags: | ||
| - '*' | ||
|
|
||
| jobs: | ||
| release: | ||
| name: Create Release | ||
| runs-on: macos-14 | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Select Xcode Version | ||
| run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer | ||
|
|
||
| - name: Validate Package | ||
| run: | | ||
| swift package resolve | ||
| swift build --configuration release | ||
| swift test --configuration release | ||
|
|
||
| - name: Create Release Archive | ||
| run: | | ||
| # Create source archive | ||
| git archive --format=zip --prefix=swift-ui-debug-scan-${{ github.ref_name }}/ HEAD > swift-ui-debug-scan-${{ github.ref_name }}.zip | ||
|
|
||
| - name: Extract Release Notes | ||
| id: extract-release-notes | ||
| run: | | ||
| # Try to extract release notes from CHANGELOG.md if it exists | ||
| if [ -f CHANGELOG.md ]; then | ||
| # Extract content between the first two version headers | ||
| VERSION_LINE=$(grep -n "^## \[?${{ github.ref_name }}\]?" CHANGELOG.md | head -1 | cut -d: -f1) | ||
| if [ ! -z "$VERSION_LINE" ]; then | ||
| NEXT_VERSION_LINE=$(tail -n +$((VERSION_LINE + 1)) CHANGELOG.md | grep -n "^## " | head -1 | cut -d: -f1) | ||
| if [ ! -z "$NEXT_VERSION_LINE" ]; then | ||
| NEXT_VERSION_LINE=$((VERSION_LINE + NEXT_VERSION_LINE)) | ||
| sed -n "${VERSION_LINE},${NEXT_VERSION_LINE}p" CHANGELOG.md | head -n -1 | tail -n +2 > release_notes.md | ||
| else | ||
| sed -n "${VERSION_LINE},$p" CHANGELOG.md | tail -n +2 > release_notes.md | ||
| fi | ||
| else | ||
| echo "Release ${{ github.ref_name }}" > release_notes.md | ||
| echo "See CHANGELOG.md for details." >> release_notes.md | ||
| fi | ||
| else | ||
| echo "Release ${{ github.ref_name }}" > release_notes.md | ||
| fi | ||
|
|
||
| - name: Create GitHub Release | ||
| uses: softprops/action-gh-release@v2 | ||
| with: | ||
| name: ${{ github.ref_name }} | ||
| body_path: release_notes.md | ||
| files: | | ||
| swift-ui-debug-scan-${{ github.ref_name }}.zip | ||
| draft: false | ||
| prerelease: ${{ contains(github.ref_name, 'alpha') || contains(github.ref_name, 'beta') || contains(github.ref_name, 'rc') }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,59 @@ | ||
| # Security Workflow - CURRENTLY DISABLED | ||
| # | ||
| # This workflow is commented out because it requires Code Security/Code Scanning | ||
| # to be enabled in the repository settings. | ||
| # | ||
| # To enable this workflow: | ||
| # 1. Go to your repository Settings > Security & analysis | ||
| # 2. Enable "Code scanning" | ||
| # 3. Uncomment this entire file | ||
| # 4. The workflow provides automated security scanning with CodeQL | ||
| # | ||
| # For more information: https://docs.github.com/en/code-security/code-scanning | ||
|
|
||
| # name: Security | ||
|
|
||
| # on: | ||
| # push: | ||
| # branches: [ main ] | ||
| # pull_request: | ||
| # branches: [ main ] | ||
| # schedule: | ||
| # # Run weekly security scans | ||
| # - cron: '0 2 * * 1' | ||
|
|
||
| # jobs: | ||
| # codeql: | ||
| # name: CodeQL Analysis | ||
| # runs-on: macos-14 | ||
| # permissions: | ||
| # actions: read | ||
| # contents: read | ||
| # security-events: write | ||
| # | ||
| # strategy: | ||
| # fail-fast: false | ||
| # matrix: | ||
| # language: [ 'swift' ] | ||
| # | ||
| # steps: | ||
| # - name: Checkout | ||
| # uses: actions/checkout@v4 | ||
| # | ||
| # - name: Initialize CodeQL | ||
| # uses: github/codeql-action/init@v3 | ||
| # with: | ||
| # languages: ${{ matrix.language }} | ||
| # | ||
| # - name: Select Xcode Version | ||
| # run: sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer | ||
| # | ||
| # - name: Build for CodeQL | ||
| # run: | | ||
| # swift package resolve | ||
| # swift build --configuration release | ||
| # | ||
| # - name: Perform CodeQL Analysis | ||
| # uses: github/codeql-action/analyze@v3 | ||
| # with: | ||
| # category: "/language:${{matrix.language}}" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.