Skip to content

Add Email OTP To B2B UI #2247

Add Email OTP To B2B UI

Add Email OTP To B2B UI #2247

Workflow file for this run

name: Test
on:
push:
branches:
- main
tags:
- '[0-9]+.[0-9]+.[0-9]+'
pull_request:
env:
DEVELOPER_DIR: /Applications/Xcode_14.3.app/Contents/Developer
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.ref != 'refs/heads/main' || github.run_number }}
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull') }}
jobs:
set-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v3
- id: set-matrix
env:
GH_TOKEN: ${{ github.token }}
run: |
matrix_values='{"test-os":"ios"},{"test-os":"macos"},{"test-os":"tvos"}'
has_watchos_pr_label() {
if [[ '${{ github.event.pull_request.number }}' ]] && [[ $(gh pr view ${{ github.event.pull_request.number }} --json labels --jq '.labels[].name' | grep 'test-watchos') ]]; then
return 0
else
return 1
fi
}
if ${{ github.ref == 'refs/heads/main' }} || [[ $(has_watchos_pr_label) -eq 0 ]]; then
matrix_values+=',{"test-os":"watchos"}'
fi
echo "matrix={\"include\":[${matrix_values}]}" >> $GITHUB_OUTPUT
test:
runs-on: macos-13
needs: set-matrix
strategy:
matrix: ${{ fromJSON(needs.set-matrix.outputs.matrix) }}
steps:
- uses: actions/checkout@v3
- name: Bootstrap
uses: ./.github/actions/bootstrap
- name: Codegen
run: |
make codegen
if [[ ! -z $(git status --porcelain | grep -Ev 'Brewfile.lock.json|Gemfile.lock') ]]; then
echo 'Codegen produced uncommitted changes. Commit changes and re-push.'
exit 1
fi
- name: Lint
run: make lint
- name: Test
run: make test-${{ matrix.test-os }}
- name: Coverage
if: matrix.test-os == 'macos'
run: |
make coverage
Scripts/generate-coverage-summary .coverage/lcov.json >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v3
if: matrix.test-os == 'macos'
with:
name: Coverage
path: .coverage/