Development Tests #462
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: Development Tests | |
on: | |
pull_request: | |
branches: ["main"] | |
pull_request_review: | |
types: [submitted] | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} | |
cancel-in-progress: true | |
jobs: | |
build-and-test: | |
name: "Build and Test" | |
uses: ./.github/workflows/unit-tests.yml | |
with: | |
ios-version: "17.2" | |
macos-runner: "macos-14" | |
check-approvals: | |
runs-on: ubuntu-latest | |
outputs: | |
reviews: ${{ steps.reviews.outputs.state }} | |
permissions: | |
pull-requests: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Check Approvals | |
id: reviews | |
env: | |
GH_TOKEN: ${{ github.token }} | |
pr: ${{ github.event.pull_request.number }} | |
run: | | |
echo "Checking PR approval for: $pr" | |
state=$(gh pr view $pr --json reviewDecision --jq '.reviewDecision') | |
echo "Review decision state: $state" | |
echo "state=$state" >> "$GITHUB_OUTPUT" | |
pre-merge-tests: | |
name: "Pre-merge Tests" | |
needs: [check-approvals] | |
if: needs.check-approvals.outputs.reviews == 'APPROVED' || github.event_name == 'workflow_dispatch' | |
uses: ./.github/workflows/unit-tests.yml | |
with: | |
ios-version: "16.1" | |
macos-runner: "macos-13-xlarge" |