Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/actionlint-matcher.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"problemMatcher": [
{
"owner": "actionlint",
"pattern": [
{
"regexp": "^(?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)?:(?:\\x1b\\[\\d+m)?(\\d+)(?:\\x1b\\[\\d+m)?:(?:\\x1b\\[\\d+m)?(\\d+)(?:\\x1b\\[\\d+m)?: (?:\\x1b\\[\\d+m)?(.+?)(?:\\x1b\\[\\d+m)? \\[(.+?)\\]$",
"file": 1,
"line": 2,
"column": 3,
"message": 4,
"code": 5
}
]
}
]
}
26 changes: 26 additions & 0 deletions .github/workflows/lint-swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Lint Swift

on:
pull_request:
branches:
- '*'
paths:
- '**/*.swift'
- 'Package.swift'
- 'Package.resolved'
- '.swiftlint.yml'
- '.github/workflows/lint-swift.yml'

jobs:
swiftlint:
name: SwiftLint
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Install SwiftLint
run: brew install swiftlint

- name: Run SwiftLint
run: swiftlint lint --strict
30 changes: 30 additions & 0 deletions .github/workflows/lint-workflows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint Workflows

on:
pull_request:
branches:
- '*'
paths:
- '.github/workflows/*.yml'
- '.github/actionlint-matcher.json'

jobs:
actionlint:
name: actionlint
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- name: Download actionlint
id: get_actionlint
run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
shell: bash

- name: Register problem matcher
run: echo "::add-matcher::.github/actionlint-matcher.json"

- name: Run actionlint
run: ${{ steps.get_actionlint.outputs.executable }} -color
shell: bash
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Test

on:
push:
branches:
- main
paths:
- '**/*.swift'
- 'Package.swift'
- 'Package.resolved'
- '.github/workflows/test.yml'
pull_request:
branches:
- '*'
paths:
- '**/*.swift'
- 'Package.swift'
- 'Package.resolved'
- '.github/workflows/test.yml'

jobs:
macos:
name: macOS
runs-on: macos-latest

steps:
- uses: actions/checkout@v4

- name: Swift version
run: swift --version

- name: Build
run: swift build -v

- name: Run tests
run: swift test -v