Skip to content

Commit 6705d42

Browse files
committed
ci: add periphery in CI/CD pipeline (GitHub Actions)
Signed-off-by: Pierre-Yves Lapersonne <[email protected]>
1 parent dfde143 commit 6705d42

File tree

5 files changed

+25
-1
lines changed

5 files changed

+25
-1
lines changed

.github/DEVELOP.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ bundle exec pod install --repo-update
3535
# Update your references
3636
brew update
3737

38-
# For Periphery (https://github.com/peripheryapp/periphery) for dead code hunt (at least 2.21.0)
38+
# For Periphery (https://github.com/peripheryapp/periphery) for dead code hunt (at least 2.21.2)
3939
brew install peripheryapp/periphery/periphery
4040

4141
# For gitleaks (https://github.com/gitleaks/gitleaks) for secrets leaks hunt (at least 8.18.1)

.github/workflows/build-and-test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ jobs:
5353
run: |
5454
bundle install
5555
56+
- name: Look for dead code
57+
run: |
58+
cd DesignToolbox
59+
bundle exec fastlane check_dead_code
60+
5661
- name: Build demo app
5762
run: |
5863
cd DesignToolbox

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515

1616
### Changed
1717

18+
- [Tool] Remove dead code and add `periphery` in CI/CD pipes
1819
- [Library] Tag component token (tokens library v0.11.0)
1920
- [Library] Chip component token (tokens library v0.11.0)
2021
- [Library] Color semantic tokens (tokens library v0.10.0)

DesignToolbox/fastlane/Fastfile

+10
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,16 @@ platform :ios do
8181
)
8282
end
8383

84+
# ------------------------------------------------------------
85+
# RUN PERIPHERY FOR DEAD CODE ANALYSIS
86+
# ------------------------------------------------------------
87+
desc "RUN PERIPHERY FOR DEAD CODE ANALYSIS"
88+
lane :check_dead_code do
89+
puts "👉 Check dead code with Periphery"
90+
91+
sh "periphery scan --strict --workspace ../DesignToolbox.xcworkspace --schemes DesignToolbox --targets DesignToolbox --format xcode"
92+
end
93+
8494
# ------------------------------------------------------------
8595
# UPDATE BUILD NUMBER WITH TIMESTAMP
8696
# ------------------------------------------------------------

DesignToolbox/fastlane/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ For _fastlane_ installation instructions, see [Installing _fastlane_](https://do
1515

1616
## iOS
1717

18+
### ios check_dead_code
19+
20+
```sh
21+
[bundle exec] fastlane ios check_dead_code
22+
```
23+
24+
RUN PERIPHERY FOR DEAD CODE ANALYSIS
25+
1826
### ios update_build_number
1927

2028
```sh

0 commit comments

Comments
 (0)