mirror of
https://github.com/seemoo-lab/openhaystack.git
synced 2026-02-14 17:49:54 +00:00
Add format to workflow pipeline
This commit is contained in:
43
.github/workflows/build-app.yml
vendored
43
.github/workflows/build-app.yml
vendored
@@ -3,11 +3,21 @@ name: "Build application"
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- OpenHaystack/**
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths:
|
||||
- OpenHaystack/**
|
||||
|
||||
env:
|
||||
APP: OpenHaystack
|
||||
defaults:
|
||||
run:
|
||||
working-directory: OpenHaystack
|
||||
|
||||
jobs:
|
||||
lint-swiftlint:
|
||||
lint-swift:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
@@ -15,15 +25,32 @@ jobs:
|
||||
- name: "Run SwiftLint"
|
||||
run: swiftlint --reporter github-actions-logging
|
||||
|
||||
format-swift:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Install swift-format"
|
||||
run: brew install swift-format
|
||||
- name: "Run swift-format"
|
||||
run: swift-format --recursive --mode lint .
|
||||
|
||||
format-objc:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v2
|
||||
- name: "Install clang-format"
|
||||
run: brew install clang-format
|
||||
- name: "Run clang-format"
|
||||
run: clang-format -n **/*.{h,m}
|
||||
|
||||
build-app:
|
||||
runs-on: macos-latest
|
||||
needs: lint-swiftlint
|
||||
env:
|
||||
APP: OpenHaystack
|
||||
PROJECT_DIR: OpenHaystack
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ${{ env.PROJECT_DIR }}
|
||||
needs:
|
||||
- lint-swift
|
||||
- format-swift
|
||||
- format-objc
|
||||
steps:
|
||||
- name: "Checkout code"
|
||||
uses: actions/checkout@v2
|
||||
|
||||
Reference in New Issue
Block a user