Skip to content

Commit

Permalink
Implement build_and_test action
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-vasilev committed Feb 29, 2024
1 parent bf670ae commit 7230de8
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 8 deletions.
25 changes: 25 additions & 0 deletions .github/actions/build_and_test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Build and Test Action

inputs:
scheme:
required: true
type: string
destination:
required: true
type: string
name:
required: true
type: string

runs:
using: "composite"

steps:
- name: ${{ inputs.name }}
run: |
xcodebuild clean build-for-testing \
-scheme ${{ inputs.scheme }} \
-destination "${{ inputs.destination }}" \
-testPlan UnitTests \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ inputs.name }}.xcresult" || exit 1
2 changes: 1 addition & 1 deletion .github/actions/upload_test_coverage_report/action.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and Test Action
name: Upload a Test Coverage Report

inputs:
filename:
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/flare.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,13 +161,11 @@ jobs:
- name: Generate project
run: make generate
- name: ${{ matrix.name }}
run: |
xcodebuild clean build-for-testing \
-scheme "Flare" \
-destination "${{ matrix.destination }}" \
-testPlan UnitTests \
-enableCodeCoverage YES \
-resultBundlePath "test_output/${{ matrix.name }}.xcresult" || exit 1
uses: ./.github/actions/build_and_test
with:
scheme: "Flare"
destination: ${{ matrix.destination }}
name: ${{ matrix.name }}
- name: Upload test coverage reports to Codecov
uses: ./.github/actions/upload_test_coverage_report
with:
Expand Down

0 comments on commit 7230de8

Please sign in to comment.