-
Notifications
You must be signed in to change notification settings - Fork 36
81 lines (71 loc) · 2.44 KB
/
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Tests
on:
pull_request:
branches:
- 'releases/**'
- 'release'
- 'develop'
- 'master'
types:
- opened
- reopened
- synchronize
- ready_for_review
merge_group:
types:
- checks_requested
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check_if_pr_has_always_run_tests_label:
name: Check if the PR has always_run_tests label
runs-on: ubuntu-latest
outputs:
has_always_run_tests_label: ${{ steps.always_run_tests_label_check.outputs.label_check == 'success' }}
steps:
- id: always_run_tests_label_check
if: ${{ github.event_name != 'workflow_dispatch' }}
# https://hub.docker.com/r/agilepathway/pull-request-label-checker/tags
uses: docker://agilepathway/pull-request-label-checker@sha256:da7c8677e87239522e0c6869ecc4c86d6b7db8b6859ad332b8b1c2129b76177b # v1.6.56 linux/amd64
with:
one_of: always_run_tests
repo_token: ${{ secrets.GITHUB_TOKEN }}
allow_failure: true
test:
name: Run unit tests
runs-on: macos-14
needs: check_if_pr_has_always_run_tests_label
if: github.event.pull_request.draft == false || needs.check_if_pr_has_always_run_tests_label.outputs.has_always_run_tests_label == 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_MOBILE_PAT }}
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Test SPM modules
run: bundle exec fastlane test_modules
- name: Test host app
run: bundle exec fastlane test
check_bsdk_example_buildable:
name: Check BSDK example project
runs-on: [self-hosted, active] # This target requires code signing, so we use self-hosted runners
needs: check_if_pr_has_always_run_tests_label
if: github.event.pull_request.draft == false || needs.check_if_pr_has_always_run_tests_label.outputs.has_always_run_tests_label == 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_MOBILE_PAT }}
- name: Bundle install
run: |
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Build BSDK example
run: bundle exec fastlane check_bsdk_example_buildable