UI tests #1275
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
push: | |
branches: [main] | |
env: | |
MIN_COVERAGE: 0.3 | |
permissions: | |
checks: write | |
pull-requests: write | |
jobs: | |
test: | |
runs-on: [self-hosted, tartelet] | |
steps: | |
- uses: actions/checkout@v2 | |
# - name: Run tests on iOS Simulator | |
# shell: bash | |
# run: | | |
# sudo xcode-select --switch /Applications/Xcode_14.3.app | |
# xcodebuild -scheme BuiltinRegistryGenerator -destination "platform=macOS" | |
# xcodebuild test -scheme LiveViewNative-Package -sdk iphonesimulator16.4 -destination "OS=16.4,name=iPhone 14 Pro" -enableCodeCoverage YES -resultBundlePath TestResults | |
# - uses: kishikawakatsumi/xcresulttool@v1 | |
# with: | |
# path: TestResults.xcresult | |
# continue-on-error: true | |
# if: success() || failure() | |
# - name: Validate Coverage % | |
# shell: bash | |
# run: | | |
# COVERAGE=$(xcrun xccov view --report --json TestResults.xcresult | jq '.targets[] | select(.name == "LiveViewNative") | .lineCoverage') | |
# if [ $(echo "$COVERAGE > $MIN_COVERAGE" | bc) -ne 1 ]; then | |
# printf "Code coverage $COVERAGE does not meet minimum requirement $MIN_COVERAGE" | |
# exit -1 | |
# else | |
# printf "Code coverage $COVERAGE meets minimum requirement $MIN_COVERAGE" | |
# fi | |
# - name: Build for macOS | |
# shell: bash | |
# run: | | |
# xcodebuild -scheme LiveViewNative-Package -sdk macosx13.3 -destination "platform=macOS" | |
# - name: Build for watchOS | |
# shell: bash | |
# run: | | |
# xcodebuild -scheme LiveViewNative-Package -sdk watchsimulator9.4 -destination "OS=9.4,name=Apple Watch Series 8 (45mm)" | |
- name: Set up Elixir | |
shell: bash | |
run: | | |
brew install elixir | |
- name: Run integration tests on iOS Simulator | |
shell: bash | |
working-directory: Tests/IntegrationTests | |
run: | | |
cd backend && mix deps.get && mix phx.server & | |
cd frontend && xcodebuild test -sdk iphonesimulator16.4 -destination "OS=16.4,name=iPhone 14 Pro" -enableCodeCoverage YES -resultBundlePath IntegrationTestResults | |
- uses: kishikawakatsumi/xcresulttool@v1 | |
with: | |
path: Tests/IntegrationTests/frontend/IntegrationTestResults.xcresult | |
continue-on-error: true | |
if: success() || failure() |