hugo/feature/Add UIModel and action to OneToOne template #2651
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Leka - iOS Monorepo | |
# Copyright APF France handicap | |
# SPDX-License-Identifier: Apache-2.0 | |
name: Linter - pre-commit hooks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
swift_format: | |
name: pre-commit hooks | |
runs-on: [self-hosted, iOS] | |
strategy: | |
fail-fast: false | |
matrix: | |
files: [changed_files, all_files] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
lfs: true | |
- name: Set up mise | |
uses: jdx/mise-action@v2 | |
with: | |
version: 2024.12.4 | |
install: true | |
cache: true | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pre-commit | |
key: pre-commit-${{ runner.name }}-${{ hashFiles('.pre-commit-config.yaml') }} | |
restore-keys: | | |
pre-commit-${{ runner.name }}- | |
pre-commit- | |
- name: Run pre-commit hooks --all-files | |
if: matrix.files == 'all_files' | |
run: | | |
pre-commit run --show-diff-on-failure --color=always --all-files | |
pre-commit gc | |
- name: Run pre-commit hooks --files | |
if: matrix.files == 'changed_files' | |
run: | | |
pre-commit run --show-diff-on-failure --color=always --files $(git diff --name-only -r HEAD^1 HEAD) |