-
Notifications
You must be signed in to change notification settings - Fork 4
63 lines (54 loc) · 1.75 KB
/
Copy pathios_linter_build_check.yaml
File metadata and controls
63 lines (54 loc) · 1.75 KB
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
name: iOS Linter Build Check Workflow
on:
pull_request:
branches:
- dev
- master
types:
- opened
- synchronize
- reopened
concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
build-and-lint:
name: Build and Lint
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Set up Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1.0'
- name: Run Linter Check
run: |
pod lib lint --allow-warnings
- name: Debug Environment Variables (Optional)
run: echo "Environment variables set successfully."
- name: Post Lint Test Results to PR
if: github.event_name == 'pull_request' && success()
uses: actions/github-script@v6
with:
script: |
const comment = `✅ **iOS Lint Test Result**\nCongratulations! Linter Check Passed Successfully 🎉`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment,
});
- name: Post Lint Failure Result to PR
if: github.event_name == 'pull_request' && failure()
uses: actions/github-script@v6
with:
script: |
const comment = `❌ **iOS Lint Test Result**\nOops! Linter Check Failed. Please fix the issues.`;
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment,
});