Skip to content

Commit 0a1493d

Browse files
authored
chore: Add fast workflow for in progress PRs (#6682)
* chore: Extract Unit Test steps into a common workflow * chore: Run intensive workflows only if ready to merge * Add fast workflow * Use `unit-test-common` workflow * Invert boolean * Invert boolean * Make sure all values are set * Fix reusable workflow name * Make workflows wait until the label is set * Use `workflow_call` * Use github event labels * Use github event labels * Add pull request event types and integrate ready-to-merge gate in workflows * Restore other workflows * Undo other changes * Inherit secrets * Set `should_skip` to `false` since the job already checks for that
1 parent e9f483c commit 0a1493d

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Fast PR Checks
2+
# Description: Runs a subset of checks for PRs to provide faster feedback.
3+
# Tests run here should run within a couple minutes.
4+
# Any job here, should reuse a workflow that is already used in the complete workflows, no new jobs should be added here.
5+
6+
on:
7+
pull_request:
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
files-changed:
15+
name: Detect File Changes
16+
runs-on: ubuntu-latest
17+
outputs:
18+
# Use the same file filters than the complete workflows
19+
run_release_for_prs: ${{ steps.changes.outputs.run_release_for_prs }}
20+
run_unit_tests_for_prs: ${{ steps.changes.outputs.run_unit_tests_for_prs }}
21+
steps:
22+
- uses: actions/checkout@v5
23+
- name: Get changed files
24+
id: changes
25+
uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
26+
with:
27+
token: ${{ github.token }}
28+
filters: .github/file-filters.yml
29+
30+
fast-xcframework-slices:
31+
name: Fast XCFramework Slice (Sentry Dynamic, iOS arm64)
32+
if: needs.files-changed.outputs.run_release_for_prs == 'true'
33+
needs: files-changed
34+
uses: ./.github/workflows/build-xcframework-variant-slices.yml
35+
with:
36+
name: Sentry
37+
suffix: -Dynamic
38+
macho-type: mh_dylib
39+
variant-id: sentry-dynamic
40+
sdk-list: '["iphoneos"]'
41+
42+
fast-unit-tests:
43+
name: Fast Unit Tests (iOS 18)
44+
if: needs.files-changed.outputs.run_unit_tests_for_prs == 'true'
45+
needs: files-changed
46+
uses: ./.github/workflows/unit-test-common.yml
47+
secrets: inherit
48+
with:
49+
name: iOS 18 Sentry
50+
runs-on: macos-15
51+
timeout: 20
52+
should_skip: false
53+
xcode: "16.4"
54+
test-destination-os: "18.4"
55+
platform: iOS
56+
device: iPhone 16 Pro
57+
scheme: Sentry
58+
59+
fast-checks-required:
60+
needs: [files-changed, fast-xcframework-slices, fast-unit-tests]
61+
name: Fast PR Checks
62+
if: always()
63+
runs-on: ubuntu-latest
64+
steps:
65+
- name: Check for failures
66+
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
67+
run: |
68+
echo "One of the fast check jobs has failed." && exit 1

0 commit comments

Comments
 (0)