-
Notifications
You must be signed in to change notification settings - Fork 57
76 lines (69 loc) · 2.2 KB
/
pr_only.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
name: PR
on:
pull_request:
types: [opened, synchronize]
jobs:
swift-api-assign-reviewer:
runs-on: ubuntu-latest
steps:
- uses: MarcoEidinger/swift-api-assign-reviewer@1.0.0
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: ".github/configActions/swift-api-assign-reviewer.yml"
conventionalcommit-verification:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v4
with:
configFile: '.github/configActions/commitlint.config.js'
ReuseComplianceCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: REUSE Compliance Check
uses: fsfe/reuse-action@v1.1
CodeFormattingCheck:
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.0'
- name: Cache Mint packages
id: mint-cache
uses: actions/cache@v2
with:
path: /usr/local/lib/mint
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: ${{ runner.os }}-mint-
- name: Install Mint
run: |
brew upgrade mint || brew install mint || true
- name: Install swiftformat via mint
if: steps.mint-cache.outputs.cache-hit != 'true'
run: mint bootstrap
- name: Format Swift code
run: mint run swiftformat --verbose .
- name: Verify formatted code is unchanged
run: git diff --exit-code HEAD
LocalizableTextCommentsCheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Checkout Repo
uses: actions/checkout@v3
- name: Check for changes in .strings files
uses: getsentry/paths-filter@v2
id: changes
with:
filters: |
src:
- 'Sources/**/*.strings'
- name: Run StringsLint to check for missing comments in .strings files
uses: dral3x/action-stringslint@1.1.0
if: steps.changes.outputs.src == 'true'