From 5ae3d13ad22b716fabd61d91d77c66c0f38d5403 Mon Sep 17 00:00:00 2001 From: Aaron Train Date: Tue, 25 May 2021 09:19:59 -0400 Subject: [PATCH] Add UI testing workflow for contributor PRs --- .github/workflows/build-contributor-pr.yml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/build-contributor-pr.yml diff --git a/.github/workflows/build-contributor-pr.yml b/.github/workflows/build-contributor-pr.yml new file mode 100644 index 000000000000..6aa4bf008fcc --- /dev/null +++ b/.github/workflows/build-contributor-pr.yml @@ -0,0 +1,39 @@ +name: Build contributor PR +on: [pull_request] +jobs: + run-ui: + if: github.event.pull_request.head.repo.full_name != github.repository + runs-on: macos-latest + timeout-minutes: 60 + strategy: + matrix: + python-version: [3.9] + xcode: [12.4] + run-config: + - { scheme: 'Fennec_Enterprise_XCUITests', destination: 'platform=iOS Simulator,OS=latest,name=iPhone 11', testplan: 'SmokeXCUITests' } + steps: + - name: Checkout repository + uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Run Boostrap + run: sh ./bootstrap.sh + - name: Build and Test + run: xcodebuild clean test -scheme '${{ matrix.run-config['scheme'] }}' -destination '${{ matrix.run-config['destination'] }}' -testPlan '${{ matrix.run-config['testplan'] }}' -resultBundlePath TestResults -derivedDataPath results + - name: Archive Results + if: ${{ always() }} + run: zip -r results.zip TestResults.xcresult + - uses: actions/upload-artifact@v2 + name: Upload XCResult + if: ${{ always() }} + with: + name: xcresult + path: results.zip + - name: Summarize XCResult + uses: tbartelmess/analyze-xcoderesults-action@0.1.1 + if: ${{ always() }} + with: + results: TestResults.xcresult + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}