Skip to content

Commit

Permalink
👷 (ci): Linter - SwiftFormat - move to github hosted
Browse files Browse the repository at this point in the history
  • Loading branch information
ladislas committed Dec 10, 2024
1 parent 02e4364 commit bdc4bff
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions .github/workflows/ci-linter-swiftformat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,21 @@ concurrency:
jobs:
swift_format:
name: swiftformat
runs-on: [self-hosted, iOS]
runs-on: [ubuntu-24.04]

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history for all branches and tags
fetch-depth: 0
lfs: false

- name: Setup mise
run: |
echo "$HOME/.local/share/mise/shims" >> $GITHUB_PATH
mise install
uses: jdx/mise-action@v2
with:
version: 2024.12.4
install: true
cache: true

- name: Run swiftformat
run: |
Expand All @@ -39,4 +41,10 @@ jobs:
which swiftformat
swiftformat --version
swiftformat --lint --reporter github-actions-log .
git diff origin/develop --name-only --diff-filter=AMCR \
| grep -E "\.swift\$$" \
|| echo "No files added nor modified!"
git diff origin/develop --name-only --diff-filter=AMCR \
| grep -E "\.swift\$$" \
| xargs --no-run-if-empty swiftformat --lint --reporter github-actions-log --verbose

0 comments on commit bdc4bff

Please sign in to comment.