From 738d10dd718f81c3eb4a6014a854784ecccd2fae Mon Sep 17 00:00:00 2001 From: KAWASHIMA Yoshiyuki Date: Thu, 26 Dec 2024 23:09:33 +0900 Subject: [PATCH] Revert "Merge pull request #86 from yumemi-inc/feature/matrix_test" This reverts commit 5172b0de20b3332dac1ac81cf1c4ed1eab4cfcda, reversing changes made to 2b29eb4bc05b844cdeda3034de5c301bfcab173c. --- .github/workflows/test.yml | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8da6fb4..7d6a350 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,45 +2,32 @@ name: Test on: push: - branches: ["main"] + branches: [ "main" ] pull_request_target: - branches: ["main"] + branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: - setup: - runs-on: ubuntu-latest - outputs: - matrix: ${{ steps.setmatrix.outputs.matrix }} - steps: - - id: setmatrix - run: | - object="[{\"scheme\":\"YumemiWeather\",\"dir\":\".\"},{\"scheme\":\"Example\",\"dir\":\"Example\"}]" - echo "matrix=$object" >> $GITHUB_OUTPUT - test: - needs: setup + build: runs-on: macos-latest permissions: contents: read checks: write - strategy: - matrix: - config: ${{fromJson(needs.setup.outputs.matrix)}} steps: - name: Checkout uses: actions/checkout@v4 - name: Test env: + scheme: ${{ 'YumemiWeather' }} platform: ${{ 'iOS Simulator' }} run: | # xcrun xctrace returns via stderr, not the expected stdout (see https://developer.apple.com/forums/thread/663959) device=`xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}' | sed -e "s/ Simulator$//"` - cd ${{ matrix.config.dir }} - xcodebuild -scheme "${{ matrix.config.scheme }}" -resultBundlePath ${{ matrix.config.scheme }} test -destination "platform=$platform,name=$device" - - name: Report + xcodebuild -scheme "$scheme" -resultBundlePath TestResults test -destination "platform=$platform,name=$device" + - name: Format uses: kishikawakatsumi/xcresulttool@v1 with: - path: ${{ matrix.config.scheme }}.xcresult + path: TestResults.xcresult if: success() || failure()