From 39c01a7527a7058264e5e7daea7e947fd387bf35 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 00:59:15 +0100 Subject: [PATCH 1/7] Create lint.yml --- .github/workflows/lint.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 00000000..038a067d --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,17 @@ +name: Lint + +on: + pull_request: + push: + branches: master + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: Cyberbeni/install-swift-tool@v2 + with: + url: https://github.com/realm/SwiftLint + version: '*' + - run: swiftlint lint --strict . From de996de77114f1d81b37f31e6751a147be0c1fb0 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 01:08:51 +0100 Subject: [PATCH 2/7] Create test.yml --- .github/workflows/test.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 00000000..dd859bf6 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,13 @@ +name: Test + +on: + pull_request: + push: + branches: master + +jobs: + test: + runs-on: macos-latest + steps: + - uses: actions/checkout@v2 + - run: fastlane scan From 74f5e3ebd0c859809843d9104b50d0bfd57712e6 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 01:10:44 +0100 Subject: [PATCH 3/7] Update test.yml --- .github/workflows/test.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index dd859bf6..62e98a37 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -10,4 +10,8 @@ jobs: runs-on: macos-latest steps: - uses: actions/checkout@v2 - - run: fastlane scan + - uses: Cyberbeni/install-swift-tool@v2 + with: + url: https://github.com/thii/xcbeautify + version: '*' + - run: swift test | xcbeautify From c0f15d58de09a11695a9ccbc1761279d8136a44a Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 01:15:22 +0100 Subject: [PATCH 4/7] fix swiftlint issue --- Tests/LicensePlistTests/Entity/SwiftPackageManagerTests.swift | 1 - 1 file changed, 1 deletion(-) diff --git a/Tests/LicensePlistTests/Entity/SwiftPackageManagerTests.swift b/Tests/LicensePlistTests/Entity/SwiftPackageManagerTests.swift index 7abcc242..6a272054 100644 --- a/Tests/LicensePlistTests/Entity/SwiftPackageManagerTests.swift +++ b/Tests/LicensePlistTests/Entity/SwiftPackageManagerTests.swift @@ -143,7 +143,6 @@ class SwiftPackageManagerTests: XCTestCase { func testParse() { let path = "https://raw.githubusercontent.com/mono0926/LicensePlist/master/Package.resolved" - //let path = "https://raw.githubusercontent.com/mono0926/LicensePlist/master/Tests/LicensePlistTests/Resources/Package.resolved" let content = try! String(contentsOf: URL(string: path)!) let packages = SwiftPackage.loadPackages(content) From 48e7b8dd2e13ef4e2f64c7a986bf807810abfac4 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 18:25:49 +0100 Subject: [PATCH 5/7] Fix workflow formatting --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 62e98a37..216de560 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -14,4 +14,5 @@ jobs: with: url: https://github.com/thii/xcbeautify version: '*' - - run: swift test | xcbeautify + - run: | + swift test | xcbeautify From d64f39eb721677288a1d225fbe6578ef21908524 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Tue, 15 Dec 2020 18:30:45 +0100 Subject: [PATCH 6/7] set -o pipefail --- .github/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 216de560..eaed8dd6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,4 +15,5 @@ jobs: url: https://github.com/thii/xcbeautify version: '*' - run: | + set -o pipefail swift test | xcbeautify From ea7c1968170463b3394b2f410498861af6d79a04 Mon Sep 17 00:00:00 2001 From: Benedek Kozma Date: Fri, 18 Dec 2020 20:41:00 +0100 Subject: [PATCH 7/7] redirect error output to normal output --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index eaed8dd6..1bb40ca7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,4 +16,4 @@ jobs: version: '*' - run: | set -o pipefail - swift test | xcbeautify + swift test 2>&1 | xcbeautify