MOEN-41290: Added Swift Package Manager distribution support #3
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run tests | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| inputs: | |
| environment_variables: | |
| description: Custom space separated environment variables, that can be used for setup task | |
| type: string | |
| required: false | |
| default: '' | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| cocoapods: | |
| name: Build and run tests for CocoaPods | |
| runs-on: macos-15 | |
| steps: | |
| - name: Set custom environment variables | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| VARIABLES=(${{ inputs.environment_variables }}) | |
| for variable in ${VARIABLES[@]}; do | |
| echo "$variable" >> $GITHUB_ENV | |
| done | |
| - name: Checkout scripts | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| path: scripts | |
| repository: moengage/sdk-automation-scripts | |
| - name: Setup dev environment | |
| uses: ./scripts/actions/ios-action-setup | |
| env: | |
| SDK_BOT_ACCESS_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| - name: Checkout source repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| path: source | |
| - name: Build and Run tests | |
| working-directory: ./source/Examples | |
| run: pod lib lint --allow-warnings --skip-import-validation | |
| swift-package: | |
| name: Build and run tests for Swift Package Manager | |
| runs-on: macos-15 | |
| steps: | |
| - name: Set custom environment variables | |
| if: github.event_name == 'workflow_dispatch' | |
| run: | | |
| VARIABLES=(${{ inputs.environment_variables }}) | |
| for variable in ${VARIABLES[@]}; do | |
| echo "$variable" >> $GITHUB_ENV | |
| done | |
| - name: Checkout scripts | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| path: scripts | |
| repository: moengage/sdk-automation-scripts | |
| - name: Setup dev environment | |
| uses: ./scripts/actions/ios-action-setup | |
| env: | |
| SDK_BOT_ACCESS_TOKEN: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| - name: Checkout source repository | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.SDK_BOT_ACCESS_TOKEN }} | |
| path: source | |
| - name: Validate CHANGELOG | |
| run: ${{ github.workspace }}/scripts/scripts/release/ios/validate_changelog.rb | |
| working-directory: ./source | |
| - name: Build and Run tests | |
| run: ${{ github.workspace }}/scripts/scripts/release/ios/build_swift_package.rb | |
| working-directory: ./source |