-
Notifications
You must be signed in to change notification settings - Fork 10
42 lines (42 loc) · 1.51 KB
/
Copy pathswift-format.yml
File metadata and controls
42 lines (42 loc) · 1.51 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
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: Swift Format
permissions: read-all # zizmor: ignore[excessive-permissions]
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
format:
name: Verify Swift Formatting
runs-on: ubuntu-24.04
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # ratchet:actions/checkout@v6
- name: Install Swift
uses: ./.github/actions/install-swift
- name: Format Swift Code
env:
GITHUB_EVENT_NAME: "${{ github.event_name }}"
run: ./ci/format.sh "${GITHUB_EVENT_NAME}"
- name: Detect drift
run: git diff --exit-code
typos:
runs-on: ubuntu-24.04
timeout-minutes: 5
steps:
- name: Checkout Repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # ratchet:actions/checkout@v6
- uses: crate-ci/typos@512fc24f32f44ab01972217aaaf3dc86ec234d53 # ratchet:crate-ci/typos@v1.45.0