File tree Expand file tree Collapse file tree 8 files changed +81
-19
lines changed Expand file tree Collapse file tree 8 files changed +81
-19
lines changed Original file line number Diff line number Diff line change 1+ name : Build and Test
2+
3+ runs :
4+ using : composite
5+ steps :
6+ - name : Execute Tests
7+ shell : bash
8+ run : |
9+ bazelisk test //...
10+
11+ - name : Build Anything Not Tested
12+ shell : bash
13+ run : |
14+ bazelisk build //...
15+
16+ - name : Ensure all packages have bzlformat checks
17+ shell : bash
18+ run : |
19+ bazelisk run //:bzlformat_missing_pkgs_test
20+
21+ - name : Execute Integration Tests
22+ shell : bash
23+ run : |
24+ bazelisk test //:all_integration_tests
Original file line number Diff line number Diff line change 66
77jobs :
88 macos_build :
9-
109 runs-on : macos-11.0
11-
1210 steps :
1311 - uses : actions/checkout@v2
14-
1512 - uses : cgrindel/gha_set_up_bazel@v1
1613 with :
1714 repo_name : rules_swiftformat
15+ - uses : ./.github/actions/build_and_test
1816
19- - name : Execute Tests
20- shell : bash
21- run : |
22- bazelisk test //...
23-
24- - name : Build Anything Not Tested
25- shell : bash
26- run : |
27- bazelisk build //...
28-
29- - name : Ensure all packages have bzlformat checks
17+ ubuntu_build :
18+ runs-on : ubuntu-20.04
19+ env :
20+ CC : clang
21+ steps :
22+ - uses : cgrindel/gha_install_swift_on_ubuntu@v1
23+ with :
24+ swift_release_tag : " swift-5.5.2-RELEASE"
25+ ubuntu_version : " 20.04"
26+ - uses : actions/checkout@v2
27+ - uses : cgrindel/gha_set_up_bazel@v1
28+ with :
29+ repo_name : rules_swiftformat
30+ - name : Update local.bazelrc with Linux Flags
3031 shell : bash
3132 run : |
32- bazelisk run //:bzlformat_missing_pkgs_test
33+ cat >> "local.bazelrc" <<EOF
34+ # Need to expose the PATH so that the Swift toolchain can be found
35+ build --action_env=PATH
36+ EOF
37+ - uses : ./.github/actions/build_and_test
38+
39+ all_ci_tests :
40+ runs-on : ubuntu-20.04
41+ needs : [macos_build, ubuntu_build]
42+ steps :
43+ - name : All is Well
44+ shell : bash
45+ run : |
46+ echo "All is well!"
3347
34- - name : Execute Integration Tests
35- shell : bash
36- run : |
37- bazelisk test //:all_integration_tests
Original file line number Diff line number Diff line change 11# Ignore Bazel symlinks
22bazel- *
33
4+ # The local.bazelrc is machine-specific.
5+ local.bazelrc
Original file line number Diff line number Diff line change @@ -7,4 +7,8 @@ class MessageTests: XCTestCase {
77 let msg = Message ( value: value)
88 XCTAssertEqual ( msg. value, value)
99 }
10+
11+ static var allTests = [
12+ ( " test_init " , test_init) ,
13+ ]
1014}
Original file line number Diff line number Diff line change @@ -9,4 +9,7 @@ import XCTest
99 pfmt. name = value
1010 XCTAssertEqual ( pfmt. name, value)
1111 }
12+ static var allTests = [
13+ ( " test_init " , test_init) ,
14+ ]
1215 }
Original file line number Diff line number Diff line change 1+ #if os(Linux)
2+ import XCTest
3+
4+ XCTMain ( [
5+ testCase ( MessageTests . allTests) ,
6+ testCase ( PoorlyFormattedTests . allTests) ,
7+ ] )
8+ #endif
Original file line number Diff line number Diff line change @@ -7,4 +7,8 @@ class MessageTests: XCTestCase {
77 let msg = Message ( value: value)
88 XCTAssertEqual ( msg. value, value)
99 }
10+
11+ static var allTests = [
12+ ( " test_init " , test_init) ,
13+ ]
1014}
Original file line number Diff line number Diff line change 1+ #if os(Linux)
2+ import XCTest
3+
4+ XCTMain ( [
5+ testCase ( MessageTests . allTests) ,
6+ ] )
7+ #endif
You can’t perform that action at this time.
0 commit comments