Skip to content

Commit

Permalink
ci: use unit-test workflow in release (#214)
Browse files Browse the repository at this point in the history
* feat: make unit tests parallel

* ci: add test for the lowest xcode version we can support

* ci: run test on multiple os versions

* ci: fix old test os version

* fix: make source code compatibale with xcode 14.1

* fix: make source code compatibale with xcode 14.1

* fix: make source code compatibale with xcode 14.1

* fix: make source code compatibale with xcode 14.1

* fix: make source code compatibale with xcode 14.1

* fix: make workflow reusable

* ci: use unit-test workflow in the release workflow
  • Loading branch information
PouriaAmini authored Aug 17, 2024
1 parent 4d77ce7 commit 0ef306e
Showing 1 changed file with 5 additions and 34 deletions.
39 changes: 5 additions & 34 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,49 +21,20 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

run-tests:
name: Run Tests
uses: ./.github/workflows/unit-test.yml

release:
name: Release
runs-on: macos-13
needs: [authorize]
needs: [authorize, run-tests]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Xcode 15
run: |
sudo xcode-select -switch /Applications/Xcode_15.2.app
- name: iOS Tests
run: |
xcodebuild test \
-scheme Amplitude-Swift-Package \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15'
- name: macOS Tests
run: |
xcodebuild test \
-scheme Amplitude-Swift-Package \
-sdk macosx \
-destination 'platform=macosx'
- name: tvOS Tests
run: |
xcodebuild \
-scheme Amplitude-Swift-Package \
-sdk appletvsimulator \
-destination 'platform=tvOS Simulator,name=Apple TV' \
test
- name: watchOS Tests
run: |
xcodebuild \
-scheme Amplitude-Swift-Package \
-sdk watchsimulator \
-destination 'platform=watchOS Simulator,name=Apple Watch Series 8 (41mm)' \
test
- name: Objective-C Example Tests (iOS)
working-directory: Examples/AmplitudeObjCExample
run: |
xcodebuild test \
-scheme AmplitudeObjCExample \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 15'
- name: Validate Podfile
run: pod lib lint --allow-warnings
Expand Down

0 comments on commit 0ef306e

Please sign in to comment.