From 48920c2a19f017839c1e7e9388c25440ebcc8b6a Mon Sep 17 00:00:00 2001 From: "tattn (Tatsuya Tanaka)" Date: Thu, 19 Oct 2023 00:46:20 +0900 Subject: [PATCH] Improve GitHub Checks --- .github/workflows/ci.yml | 8 +++++++- Makefile | 2 +- .../App/VCamUIPreviewUITests/VCamUIPreviewUITests.swift | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0b379e7..a1fb600 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,8 +30,14 @@ jobs: test-ui-preview: runs-on: macOS-13 + permissions: + checks: write steps: - uses: actions/checkout@main - - name: Build + - name: UI test run: set -o pipefail && make test-ui-preview | xcpretty + - uses: kishikawakatsumi/xcresulttool@v1 + with: + path: /tmp/UITestResults.xcresult + if: success() || failure() diff --git a/Makefile b/Makefile index 7a7211f..a5c41e9 100644 --- a/Makefile +++ b/Makefile @@ -7,5 +7,5 @@ build-ui-preview: cd app/xcode/App && xcodebuild -project VCam.xcodeproj -scheme VCamUIPreview -derivedDataPath /tmp/build clean build test-ui-preview: - cd app/xcode/App && xcodebuild -project VCam.xcodeproj -scheme VCamUIPreviewUITests -derivedDataPath /tmp/build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO + cd app/xcode/App && xcodebuild -project VCam.xcodeproj -scheme VCamUIPreviewUITests -derivedDataPath /tmp/build -resultBundlePath /tmp/UITestResults test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO diff --git a/app/xcode/App/VCamUIPreviewUITests/VCamUIPreviewUITests.swift b/app/xcode/App/VCamUIPreviewUITests/VCamUIPreviewUITests.swift index 5b2b3e3..824b4df 100644 --- a/app/xcode/App/VCamUIPreviewUITests/VCamUIPreviewUITests.swift +++ b/app/xcode/App/VCamUIPreviewUITests/VCamUIPreviewUITests.swift @@ -30,7 +30,7 @@ final class VCamUIPreviewUITests: XCTestCase { } XCTContext.runActivity(named: "Check VCamUI") { _ in - XCTAssertTrue(app.buttons["Main"].exists) + XCTAssertTrue(app.buttons[L10n.main.text].exists) } } }