-
Notifications
You must be signed in to change notification settings - Fork 337
50 lines (45 loc) · 1.32 KB
/
development-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
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"