-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (33 loc) · 1.01 KB
/
lint.yml
File metadata and controls
44 lines (33 loc) · 1.01 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
name: 🧹 Lint
on:
pull_request:
branches: [ "main" ]
types: [opened, synchronize]
# push:
# Every push if left empty
jobs:
lint-code:
runs-on: macos-latest
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Check last commit for skip keyword
run: python workflow_scripts/check_latest_commit_for_skip.py >> $GITHUB_ENV
- name: ⏩ SKIPPING REMAINING STEPS 👀
if: env.should_skip == 'true'
run: exit 0
- name: Set up Ruby
if: env.should_skip == 'false'
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3.5' # latest stable as of 2 November 2024
- name: Install SwiftLint
if: env.should_skip == 'false'
run: brew install swiftlint
- name: Lint code using SwiftLint
if: env.should_skip == 'false'
run: swiftlint --strict