Skip to content

Commit

Permalink
ci: Add basic checks
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippeWeidmann committed Feb 5, 2025
1 parent 782c57b commit 9d1f9c7
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 6 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,4 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: xcodebuild -scheme InfomaniakCoreUI-Package build -sdk iphonesimulator -destination "generic/platform=iOS"
- name: Test
run: xcodebuild -scheme InfomaniakCoreUI-Package test -sdk iphonesimulator -destination "platform=iOS Simulator,name=iPhone 16 Pro,OS=latest"
run: xcodebuild -scheme ios-features build -sdk iphonesimulator -destination "generic/platform=iOS"
4 changes: 2 additions & 2 deletions .github/workflows/semantic-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
- name: Check Commit Message
uses: gsactions/commit-message-checker@v2
with:
pattern: '^Merge .+|(^(feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+)'
error: 'Commit messages and PR title should match conventional commit convention and start with a majuscule.'
pattern: '^(Merge .+|((feat|fix|chore|docs|style|refactor|perf|ci|test)(\(.+\))?: [A-Z0-9].+[^.\s])$)'
error: 'Commit messages and PR title should match conventional commit convention and start with an uppercase.'
excludeDescription: 'true'
excludeTitle: 'false'
checkAllCommitMessages: 'true'
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/swiftformat.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SwiftFormat

on:
pull_request:
branches: [ main ]

jobs:
build:
name: SwiftFormat
runs-on: [ self-hosted, iOS ]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftFormat
run: swiftformat --lint . --reporter github-actions-log
25 changes: 25 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SwiftLint

on:
pull_request:
branches: [ main ]

jobs:
build:
name: SwiftLint
runs-on: [ self-hosted, iOS ]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: jdx/mise-action@v2
with:
cache: false
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SwiftLint
run: swiftlint --config .swiftlint.yml --config .swiftlint-ci.yml --reporter github-actions-logging .
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let package = Package(
.library(
name: "MyKSuite",
targets: ["MyKSuite"]
),
)
],
dependencies: [
.package(url: "https://github.com/Infomaniak/ios-core-ui", .upToNextMajor(from: "17.2.0"))
Expand Down

0 comments on commit 9d1f9c7

Please sign in to comment.