Skip to content

Commit

Permalink
added ci files
Browse files Browse the repository at this point in the history
  • Loading branch information
Vladimir Espinola committed May 29, 2024
1 parent fc1cdbe commit 9910df3
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 10 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,22 @@ jobs:
run: xcodebuild -project "attentive-ios-sdk.xcodeproj" -scheme "attentive-ios-sdk-framework" -destination "platform=iOS Simulator,OS=16.1,name=iPhone 13 Pro" test

lint:
name: Run Swiftlint
runs-on: macos-14
name: Run lint
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install SwiftLint
run: brew install swiftlint
- name: Set Xcode 15
- uses: actions/checkout@v3
- name: "Install clang-format"
run: sudo apt -y install clang-format-11
- name: "Run lint"
run: |
sudo xcode-select -switch /Applications/Xcode_15.3.app
- name: Lint
run: swiftlint
echo "Running lint"
find . \( \
-path "./Vendor/*" -prune -o \
-path "./*/Pods/*" -prune -o \
-path "./DerivedData/*" -prune -o \
-path "./build/*" -prune -o \
-path "./*/DerivedData/*" -prune -o \
-path "./*/build/*" -prune -o \
-path "./attentive-ios-sdk.xc*" -prune \
\) \
-o -name "*.h" -o -name "*.m" -print | xargs clang-format --dry-run --Werror --assume-filename=Objective-C
24 changes: 24 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Lint

on:
pull_request:
branches:
- develop
- swift-migration
- main
- feature/*

jobs:
lint:
name: Run Swiftlint
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install SwiftLint
run: brew install swiftlint
- name: Set Xcode 15
run: |
sudo xcode-select -switch /Applications/Xcode_15.3.app
- name: Lint
run: swiftlint

0 comments on commit 9910df3

Please sign in to comment.