diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bb5869a8..459133ee 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,4 +44,7 @@ jobs: - name: Poetry install run: | pipx install poetry && poetry -C client/trailbase-py install + - uses: swift-actions/setup-swift@v2 + with: + swift-version: "6.1" - uses: pre-commit/action@v3.0.1 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 264f7036..b29c81d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,7 +52,7 @@ repos: exclude: '^(vendor|bindings)/' pass_filenames: false - ### Auth, Admin, Docs UI ### + ### JS/TypeScript: Cient, Admin UI, Auth UI, Docs, examples ... ### - id: prettier name: Prettier entry: pnpm -r format --check @@ -85,7 +85,7 @@ repos: files: .*\.(js|mjs|cjs|ts|jsx|tsx|astro)$ pass_filenames: false - ### Dart client and example + ### Dart: client and example - id: dart_format name: Dart format entry: dart format -o none --set-exit-if-changed client/trailbase-dart examples/blog/flutter @@ -151,3 +151,12 @@ repos: types: [file] files: .*\.(py)$ pass_filenames: false + + ### Swift client + - id: swift_format + name: Swift format + entry: swift format -r client/trailbase-swift/**/*.swift + language: system + types: [file] + files: .*\.(swift)$ + pass_filenames: false diff --git a/Makefile b/Makefile index 00650661..b452e0b4 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,8 @@ format: txtpbfmt `find . -regex ".*.textproto" | grep -v config.textproto`; \ dotnet format client/trailbase-dotnet/src; \ dotnet format client/trailbase-dotnet/test; \ - poetry -C client/trailbase-py run black --config pyproject.toml . + poetry -C client/trailbase-py run black --config pyproject.toml .; \ + swift format -r -i client/trailbase-swift/**/*.swift; check: pnpm -r check; \