Skip to content

Commit

Permalink
feat: run typos in CI
Browse files Browse the repository at this point in the history
Also, pin the macos runner version
  • Loading branch information
jbergstroem committed Aug 26, 2024
1 parent 4f48761 commit 4d2bc21
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 12 deletions.
10 changes: 0 additions & 10 deletions .github/workflows/lint.yml

This file was deleted.

14 changes: 14 additions & 0 deletions .github/workflows/validate-format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Lint
on:
pull_request:
paths:
- "**/*.swift"
- ".github/workflows/validate-format.yml"

jobs:
Lint:
runs-on: macos-14

Check failure on line 10 in .github/workflows/validate-format.yml

View workflow job for this annotation

GitHub Actions / Actionlint

label "macos-14" is unknown. available labels are "windows-latest", "windows-2022", "windows-2019", "windows-2016", "ubuntu-latest", "ubuntu-22.04", "ubuntu-20.04", "ubuntu-18.04", "macos-latest", "macos-latest-xl", "macos-13-xl", "macos-13", "macos-13.0", "macos-12-xl", "macos-12", "macos-12.0", "macos-11", "macos-11.0", "macos-10.15", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file
steps:
- uses: actions/checkout@v3
- name: SwiftFormat
run: swiftformat --lint --reporter github-actions-log .
18 changes: 18 additions & 0 deletions .github/workflows/validate-typos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Typos
on:
pull_request:
paths:
- "**/*.md"
- "**/*.yml"
- "**/*.swift"
- ".github/workflows/validate-typos.yml"

jobs:
typos:
name: Check for language typos
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
# No major tag unfortunately
# https://github.com/crate-ci/typos/issues/857
- uses: crate-ci/[email protected]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ struct ContentView: View {
TopsortBanner(
apiKey: "API_KEY",
url: "https://api.topsort.com/v2",
width: widht,
width: width,
height: height,
slotId: "slotId",
deviceType: "device"
Expand Down
2 changes: 1 addition & 1 deletion Tests/topsort.swiftTests/topsort_swiftTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import XCTest

final class topsort_swiftTests: XCTestCase {
func testExample() throws {
// XCTest Documenation
// XCTest Documentation
// https://developer.apple.com/documentation/xctest

// Defining Test Cases and Test Methods
Expand Down

0 comments on commit 4d2bc21

Please sign in to comment.