-
Notifications
You must be signed in to change notification settings - Fork 1
Sync workflows + lint configs from MistKit; fix all warnings #159
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
4 commits
Select commit
Hold shift + click to select a range
4bee9f3
Sync workflows, swift-format, swiftlint configs from MistKit; fix all…
leogdion 67fe748
Address PR #159 review feedback
leogdion 8456e3a
Restore --strict for swift-format in STRICT mode
leogdion ed97e43
Lint Tests headers and scope SwiftLint to Sources/Tests [skip ci]
leogdion 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| name: Setup mise tools | ||
| description: >- | ||
| Restore (or build + save) the mise tool cache and put the binaries on PATH. | ||
| Implemented as a composite action so the cache scope is the caller job's | ||
| scope — reusable workflows scope caches separately, which silently breaks | ||
| hand-off between a setup job and a consumer lint job. | ||
|
|
||
| runs: | ||
| using: composite | ||
| steps: | ||
| - name: Cache mise tools | ||
| id: mise-cache | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.local/share/mise/installs | ||
| key: mise-v2-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('mise.toml') }} | ||
| restore-keys: | | ||
| mise-v2-${{ runner.os }}-${{ runner.arch }}- | ||
| - name: Install mise tools (cache miss) | ||
| if: steps.mise-cache.outputs.cache-hit != 'true' | ||
| uses: jdx/mise-action@v4 | ||
| with: | ||
| cache: false | ||
| - name: Configure PATH for cached mise tools | ||
| if: steps.mise-cache.outputs.cache-hit == 'true' | ||
| uses: jdx/mise-action@v4 | ||
| with: | ||
| install: false | ||
| cache: false |
|
leogdion marked this conversation as resolved.
|
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,39 @@ | ||
| name: Check for unsafeFlags | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| dump-package-check: | ||
| name: Dump Swift package (authoritative) and scan JSON | ||
| runs-on: ubuntu-latest | ||
| container: | ||
| image: swift:latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Install jq | ||
| run: | | ||
| apt-get update && apt-get install -y jq | ||
|
|
||
| - name: Dump package JSON and check for unsafeFlags | ||
| shell: bash | ||
| run: | | ||
| set -euo pipefail | ||
| # Compute unsafeFlags array directly from the dump (don't store the full dump variable) | ||
| unsafe_flags=$(swift package dump-package | jq -c '[.. | objects | .unsafeFlags? // empty]') | ||
| # Check array length to decide failure | ||
| if [ "$(echo "$unsafe_flags" | jq 'length')" -gt 0 ]; then | ||
| echo "ERROR: unsafeFlags found in resolved package JSON:" | ||
| echo "$unsafe_flags" | jq '.' || true | ||
| echo "--- resolved package dump (first 200 lines) ---" | ||
| # Print a sample of the authoritative dump (re-run dump-package for the sample) | ||
| swift package dump-package | sed -n '1,200p' || true | ||
| exit 1 | ||
| else | ||
| echo "No unsafeFlags in resolved package JSON." | ||
| fi |
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,31 @@ | ||
| name: Swift Source Compatibility | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
| pull_request: | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| swift-source-compat-suite: | ||
| name: Test Swift ${{ matrix.container }} For Source Compatibility Suite | ||
| runs-on: ubuntu-latest | ||
| if: ${{ !contains(github.event.head_commit.message, 'ci skip') }} | ||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| container: | ||
| - swift:6.0 | ||
| - swift:6.1 | ||
|
leogdion marked this conversation as resolved.
|
||
| - swift:6.2 | ||
| - swift:6.3 | ||
|
|
||
| container: ${{ matrix.container }} | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v6 | ||
|
|
||
| - name: Test Swift 6.x For Source Compatibility | ||
| run: swift build --disable-sandbox --verbose --configuration release | ||
This file was deleted.
Oops, something went wrong.
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
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
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.