-
Notifications
You must be signed in to change notification settings - Fork 0
ci: run swift build and swift test on every push and PR #57
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
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,57 @@ | ||
| name: tests | ||
|
|
||
| # Runs `swift build` then `swift test`. | ||
| # | ||
| # Filed as part of the fleet-wide CI gap recorded in ecosystem#40: 12 of the 14 | ||
| # repos in the OCCT stack carried a full test suite that no CI job ever executed, | ||
| # so a failing test produced a green tick. That is not hypothetical. Five | ||
| # assertions in OCCTSwiftAIS sat broken for nine days (OCCTSwiftAIS#46) because | ||
| # nothing in its pipeline ever compiled a test target. | ||
| # | ||
| # `swift build` and `swift test` are separate steps on purpose, so a compile | ||
| # failure and a test failure are distinguishable at a glance. Note that | ||
| # `swift build` alone is a weaker signal than it looks: it does not compile test | ||
| # targets at all. OCCTSwiftIO built clean with zero errors while carrying three | ||
| # real breaks in its test target during the OCCTSwift v3.0.0 repin. | ||
| # | ||
| # Blocking, not `continue-on-error`: a red here is meant to stop a merge, the same | ||
| # reasoning already written into OCCTSwiftScripts' tests.yml. | ||
| # | ||
| # macOS-only: the OCCTSwift dependency ships as a macOS xcframework, the same | ||
| # reasoning OCCTSwiftScripts' own tests.yml uses. | ||
| # | ||
| # Baseline at rollout: 45 tests passing. | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - 'Sources/**' | ||
| - 'Tests/**' | ||
| - 'Package.*' | ||
| - '.github/workflows/tests.yml' | ||
| pull_request: | ||
| paths: | ||
| - 'Sources/**' | ||
| - 'Tests/**' | ||
| - 'Package.*' | ||
| - '.github/workflows/tests.yml' | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| tests: | ||
| runs-on: macos-15 | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - name: Cache SwiftPM | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: .build | ||
| key: spm-${{ runner.os }}-${{ hashFiles('Package.resolved') }} | ||
| restore-keys: spm-${{ runner.os }}- | ||
|
|
||
| - name: swift build | ||
| run: swift build | ||
|
|
||
| - name: swift test | ||
| run: swift test | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CRITICAL: Missing required
OCCT_SERIAL=1and serial test flagsThe CLAUDE.md explicitly states:
OCCT_SERIAL=1 swift test --parallel --num-workers 1 # MUST run serially— there is a known NCollection container-overflow race in OCCT on arm64 macOS that segfaults parallel test runs. The workflow runs onmacos-15(arm64), soswift testwithout these flags will likely segfault.Reply with
@kilocode-bot fix itto have Kilo Code address this issue.