diff --git a/.github/workflows/actions.yml b/.github/workflows/actions.yml new file mode 100644 index 000000000..c1529f625 --- /dev/null +++ b/.github/workflows/actions.yml @@ -0,0 +1,10 @@ +name: lint-build +on: + pull_request: + types: [ opened, edited, synchronize ] + +jobs: + linter: + uses: adevinta/spark-ios-common/.github/workflows/linter.yml@main + buildAndTest: + uses: adevinta/spark-ios/.github/workflows/buildDemo.yml@main \ No newline at end of file diff --git a/.github/workflows/buildDemo.yml b/.github/workflows/buildDemo.yml new file mode 100644 index 000000000..5ddfdb3a1 --- /dev/null +++ b/.github/workflows/buildDemo.yml @@ -0,0 +1,38 @@ +name: build-and-test +on: + workflow_call + +env: + app_name: SparkDemo + xcode_path: "/Applications/Xcode_15.4.app" + +jobs: + build: + name: Build + runs-on: macos-14 + steps: + - name: Set Swift Version + uses: swift-actions/setup-swift@v1 + with: + swift-version: ${{ env.swift_version }} + - name: Get swift version + run: swift --version + - name: Select Xcode + run: sudo xcode-select -s ${{ env.xcode_path }} + - name: Checkout Action + uses: actions/checkout@v4 + - name: Run xcodegen + uses: xavierLowmiller/xcodegen-action@1.2.2 + with: + spec: project-ci.yml + version: '2.41.0' + - name: Build + run: | + xcodebuild -scheme ${{ env.app_name }} -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 15 pro,OS=17.5' build + - name: Upload xcresult file + uses: actions/upload-artifact@v4 + if: ${{ failure() }} + with: + name: ${{ env.app_name }}-${{ github.run_number }}.xcresult + path: ${{ env.app_name }}.xcresult + retention-days: 15