Skip to content

Commit

Permalink
Added workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
perlinleo committed Apr 26, 2024
1 parent 5576f27 commit 6391012
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/swiftlint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: SwiftLint

on:
pull_request:
paths:
- '.github/workflows/swiftlint.yml'
- '.swiftlint.yml'
- '**/*.swift'

jobs:
SwiftLint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
- name: GitHub Action for SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
- name: GitHub Action for SwiftLint (Only files changed in the PR)
uses: norio-nomura/action-swiftlint@3.2.1
env:
DIFF_BASE: ${{ github.base_ref }}
- name: GitHub Action for SwiftLint (Different working directory)
uses: norio-nomura/action-swiftlint@3.2.1
env:
WORKING_DIRECTORY: Source
35 changes: 35 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: macos-14

steps:
- uses: actions/checkout@v3

- name: Xcode Setup
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.2'

- name: Build
run: |
xcodebuild build -project LiveRecipes.xcodeproj -scheme LiveRecipes clean build -sdk iphoneos CODE_SIGNING_ALLOWED=No
- name: Run tests
run: |
xcrun simctl boot 'iPhone 15 Pro' || sleep 15
xcodebuild test -project LiveRecipes.xcodeproj -scheme LiveRecipes -sdk iphoneos -destination "platform=iOS Simulator,OS=17.2,name=iPhone 15 Pro" -allowProvisioningUpdates -resultBundlePath TestResults -enableCodeCoverage YES
- uses: kishikawakatsumi/xcresulttool@v1
with:
path: TestResults.xcresult
if: success() || failure()
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: iOS-vk-education/2023_2_LiveRecipes

0 comments on commit 6391012

Please sign in to comment.