Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a3ea634
Add package fixture
marinofelipe Oct 25, 2025
d0a0e48
Update package resolution
marinofelipe Oct 25, 2025
1ef8b78
Delete older fixtures
marinofelipe Oct 25, 2025
3647c48
Fix rules and make error equatable
marinofelipe Oct 25, 2025
8510ab6
Add config tests
marinofelipe Oct 25, 2025
bdf9469
Enable SPMGraphLintInput memberwise init
marinofelipe Oct 25, 2025
47c6e70
Reuse test plan
marinofelipe Oct 25, 2025
002fa72
Compile loading package fixture
marinofelipe Oct 25, 2025
88f88ca
Use orka runner
marinofelipe Oct 26, 2025
0be21fe
Improve error handling
marinofelipe Oct 26, 2025
eadac0d
Improve comment
marinofelipe Oct 26, 2025
e5e9a65
Build and run tests on both toolchains
marinofelipe Oct 26, 2025
f3c0e2d
Fix Xcode v in CI
marinofelipe Oct 26, 2025
74bbc89
Fix concurrency error
marinofelipe Oct 26, 2025
927afbc
Create fixtures support module
marinofelipe Oct 26, 2025
9943c29
Declare target
marinofelipe Oct 26, 2025
a204204
Upadte tests to use it
marinofelipe Oct 26, 2025
3609b22
Bump SPM to 6.2, increase min v to 6.1
marinofelipe Oct 26, 2025
b80b597
Bump config dependency and update readme
marinofelipe Oct 26, 2025
8771397
Disable parallel tests
marinofelipe Oct 26, 2025
6b75486
Fix test
marinofelipe Oct 26, 2025
9250189
Update scheme
marinofelipe Oct 26, 2025
ef0431e
Update readme
marinofelipe Oct 26, 2025
e6e4ce9
format input var
marinofelipe Oct 26, 2025
c17e551
remove unused input arg
marinofelipe Oct 26, 2025
582d44f
Improve config build dir docs
marinofelipe Oct 27, 2025
14b0df1
Document config build dir caching
marinofelipe Oct 27, 2025
36847d1
Merge pull request #37 from getyourguide/fix-actions
marinofelipe Oct 27, 2025
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
5 changes: 4 additions & 1 deletion .github/actions/lint/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@
**For users that leverage the lint capability and rely on the `SPMGraphConfig.swift` file**.

A custom build directory that enables CI controlling and caching of the package used to edit and load the SPMGraphConfig.
It defaults to a temporary directory, which works consistently for local runs and CI with clean builds.

- **Note**: Cache this directory in your CI and reuse whenever the `SPMGraphConfig.swift` is stable for reducing the build times.

- **Warning**: Ensure this is consistent across commands, otherwise your configuration won't be correctly loaded!
required: false
Expand All @@ -48,7 +51,7 @@
- id: lint-dependency-graph
name: Run spmgraph lint
run: |
spmgraph lint ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.strict == 'true' && '--strict' || '' }} --output lint_output ${{ inputs.config-build-directory && '--config-build-directory ${{ inputs.config-build-directory }}' || '' }}
spmgraph lint ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.strict == 'true' && '--strict' || '' }} --output lint_output ${{ inputs.config-build-directory != '' && format('--config-build-directory "{0}"', inputs.config-build-directory) || '' }}

# Set boolean output to indicate if lint failed or not
echo "lint-failed=$(cat $GITHUB_WORKSPACE/.spmgraph_lint_result.txt)" >> $GITHUB_OUTPUT
Expand Down
5 changes: 4 additions & 1 deletion .github/actions/tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
**For users that leverage the lint capability and rely on the `SPMGraphConfig.swift` file**.

A custom build directory that enables CI controlling and caching of the package used to edit and load the SPMGraphConfig.
It defaults to a temporary directory, which works consistently for local runs and CI with clean builds.

- **Note**: Cache this directory in your CI and reuse whenever the `SPMGraphConfig.swift` is stable for reducing the build times.

- **Warning**: Ensure this is consistent across commands, otherwise your configuration won't be correctly loaded!
required: false
Expand All @@ -55,7 +58,7 @@
name: Run spmgraph tests
run: |
# note: changed-files takes precedence over baseBranch
spmgraph tests ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} --baseBranch ${{ github.base_ref || 'main' }} --output ${{ inputs.output-format }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.changed-files && '--changed-files ${{ inputs.changed-files }}' || '' }} ${{ inputs.config-build-directory && '--config-build-directory ${{ inputs.config-build-directory }}' || '' }} ${{ inputs.experimental-ui-test-targets == 'true' && '--experimentalUITest' || '' }}
spmgraph tests ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} --baseBranch ${{ github.base_ref || 'main' }} --output ${{ inputs.output-format }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.changed-files && '--changed-files ${{ inputs.changed-files }}' || '' }} ${{ inputs.config-build-directory != '' && format('--config-build-directory "{0}"', inputs.config-build-directory) || '' }} ${{ inputs.experimental-ui-test-targets == 'true' && '--experimentalUITest' || '' }}
if [ ! -s "$GITHUB_WORKSPACE/output.txt" ]; then
echo "tests_needed=false" >> $GITHUB_OUTPUT
else
Expand Down
10 changes: 1 addition & 9 deletions .github/actions/visualize/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,12 @@ inputs:
description: Minimum vertical spacing between the ranks (levels) of the graph. A double value in inches.
type: number
default: '3'
config-build-directory:
description: >
**For users that leverage the lint capability and rely on the `SPMGraphConfig.swift` file**.

A custom build directory that enables CI controlling and caching of the package used to edit and load the SPMGraphConfig.

- **Warning**: Ensure this is consistent across commands, otherwise your configuration won't be correctly loaded!
required: false

runs:
using: 'composite'
steps:
- name: Run spmgraph visualize
run: |
spmgraph visualize ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.focused-module && '--focusedModule ${{ inputs.focused-module }}' || '' }} ${{ inputs.exclude-third-party-dependencies =='true' && '--excludeThirdPartyDependencies ${{ inputs.exclude-third-party-dependencies }}' || '' }} --outputFilePath ${{ inputs.output-file-path }} --rankSpacing ${{ inputs.rank-spacing }} ${{ inputs.config-build-directory && '--config-build-directory ${{ inputs.config-build-directory }}' || '' }}
spmgraph visualize ${{ inputs.package-directory }} ${{ inputs.verbose == 'true' && '-v' || '' }} ${{ inputs.excluded-suffixes && '--excludedSuffixes ${{ inputs.excluded-suffixes }}' || '' }} ${{ inputs.focused-module && '--focusedModule ${{ inputs.focused-module }}' || '' }} ${{ inputs.exclude-third-party-dependencies =='true' && '--excludeThirdPartyDependencies ${{ inputs.exclude-third-party-dependencies }}' || '' }} --outputFilePath ${{ inputs.output-file-path }} --rankSpacing ${{ inputs.rank-spacing }}
shell: /bin/bash -e {0}

35 changes: 27 additions & 8 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ concurrency:
cancel-in-progress: ${{ github.event_name == 'pull_request' }}

jobs:
build_and_tests:
name: Build and run tests
runs-on: [self-hosted, macOS, ARM64, macstadium, bare-metal] # TODO: Replace with GitHub Action runners once it goes open source
build_xcode_16:
name: Build and run tests on Xcode 16.4
runs-on: [macos-orka-large] # TODO: Replace with GitHub Action runners once it goes open source
permissions:
id-token: write
contents: read
checks: write
id-token: write
contents: read
checks: write
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -35,15 +35,34 @@ jobs:
- name: Run tests on Xcode 16.4
env:
IS_RUNNING_TESTS: 1
run: swift test
run: swift test --no-parallel
timeout-minutes: 3

build_xcode_26:
name: Build and run tests on Xcode 26.0.1
runs-on: [macos-orka-large] # TODO: Replace with GitHub Action runners once it goes open source
permissions:
id-token: write
contents: read
checks: write

steps:
- name: Check out repository
uses: actions/checkout@v4
timeout-minutes: 2

- name: Select Xcode 26.0 toolchain
uses: ./.github/actions/xcode-version
with:
xcode-version: '26.0'
xcode-version: '26.0.1'
timeout-minutes: 2

- name: Build spmgraph for Xcode 26.0
run: swift build
timeout-minutes: 3

- name: Run tests on Xcode 26.0
env:
IS_RUNNING_TESTS: 1
run: swift test --no-parallel
timeout-minutes: 3
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

# Fixture packages
**/Fixtures/**/.swiftpm/
51 changes: 49 additions & 2 deletions .swiftpm/xcode/xcshareddata/xcschemes/spmgraph-Package.xcscheme
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,55 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:spmgraph.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphExecutableTests"
BuildableName = "SPMGraphExecutableTests"
BlueprintName = "SPMGraphExecutableTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphLintTests"
BuildableName = "SPMGraphLintTests"
BlueprintName = "SPMGraphLintTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "SPMGraphDescriptionInterfaceTests"
BuildableName = "SPMGraphDescriptionInterfaceTests"
BlueprintName = "SPMGraphDescriptionInterfaceTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FixtureSupport"
BuildableName = "FixtureSupport"
BlueprintName = "FixtureSupport"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
49 changes: 20 additions & 29 deletions Package.resolved

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading