-
Notifications
You must be signed in to change notification settings - Fork 50
70 lines (64 loc) · 2.03 KB
/
pr_check.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
name: PR check
on:
pull_request:
branches:
- 'release'
- 'develop'
- 'master'
- 'hotfix/**'
- '*_pre_release'
types:
- opened
- reopened
- synchronize
- ready_for_review
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci:
name: ${{ matrix.task }}
runs-on: [ self-hosted, ARM64, macOS, active-android ]
if: github.event.pull_request.draft == false
strategy:
matrix:
task: [Detekt, Test]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true
token: ${{ secrets.GH_MOBILE_PAT }}
- name: Build Docker image
run: |
docker build --platform linux/arm64 -t tangem_ci_android_environment .
- name: Run ${{ matrix.task }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_ACTOR: ${{ secrets.GITHUB_ACTOR }}
BUNDLE_PATH: vendor/bundle
run: |
docker run --rm \
-e GITHUB_TOKEN \
-e GITHUB_ACTOR \
-e BUNDLE_PATH \
-v ~/.gradle:/root/.gradle \
-v ${{ github.workspace }}:/workspace \
tangem_ci_android_environment \
sh -c "
echo 'Running ${{ matrix.task }}...';
laneName=$(echo "${{ matrix.task }}" | awk '{print tolower(substr($0,1,1)) substr($0,2)}')
cd /workspace && fastlane laneName;
"
- name: Build notification
if: failure()
uses: adamkdean/simple-slack-notify@master
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_DVELOPMENT_ANDROID }}
with:
channel: '#development-android'
text: '${{ matrix.task }} #${{ github.run_number }} failed'
color: 'danger'
fields: |
[{ "title": "Action URL", "value": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"}]