File tree Expand file tree Collapse file tree 4 files changed +20
-11
lines changed
Tests/WorkflowTestPackageTests Expand file tree Collapse file tree 4 files changed +20
-11
lines changed Original file line number Diff line number Diff line change 66 package_path :
77 type : string
88 required : false
9- default : ' '
9+ default : ' ./ '
1010 description : " Specifies a subpath of the checkout that the package is contained in."
1111
1212jobs :
1313 format :
1414 name : Format linting
1515 runs-on : ubuntu-latest
16+ container : swift:latest
1617 steps :
17- - name : Checkout
18- uses : actions/checkout@v4
19- - name : Set up Docker Buildx
20- uses : docker/setup-buildx-action@v3
21- - name : Pull formatting docker image
22- run : docker pull ghcr.io/nicklockwood/swiftformat:latest
23- - name : Run format linting
24- run : docker run --rm -v ${{ github.workspace }}:/repo ghcr.io/nicklockwood/swiftformat:latest /repo/${{ inputs.package_path }} --lint
18+ - name : Checkout
19+ uses : actions/checkout@v4
20+ - name : Format
21+ run : |
22+ swift format lint \
23+ --parallel \
24+ --recursive \
25+ ${{ inputs.package_path != './' && inputs.package_path || './' }}
Original file line number Diff line number Diff line change 1+ {
2+ "version": 1,
3+ "indentation" : {
4+ "spaces" : 4
5+ },
6+ "lineBreakBeforeEachArgument": true
7+ }
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ let package = Package(
88 . library(
99 name: " WorkflowTestPackage " ,
1010 targets: [ " WorkflowTestPackage " ]
11- ) ,
11+ )
1212 ] ,
1313 targets: [
1414 // Targets are the basic building blocks of a package, defining a module or a test suite.
Original file line number Diff line number Diff line change 1- @testable import WorkflowTestPackage
21import XCTest
32
3+ @testable import WorkflowTestPackage
4+
45class WorkflowTestPackageTests : XCTestCase {
56 func testHello( ) {
67 XCTAssertEqual ( WorkflowTest ( ) . hello ( ) , " world " )
You can’t perform that action at this time.
0 commit comments