Skip to content

Commit

Permalink
Merge branch 'main' into fix-get-device-id
Browse files Browse the repository at this point in the history
  • Loading branch information
bgiori committed Apr 4, 2024
2 parents 3bb0b6e + 55188b6 commit bc7398e
Show file tree
Hide file tree
Showing 97 changed files with 5,164 additions and 1,512 deletions.
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ Please fill out the following sections to help us quickly review your pull reque

### Checklist

* [ ] Does your PR title have the correct [title format](https://github.com/amplitude/Amplitude-iOS/blob/master/CONTRIBUTING.md#pr-commit-title-conventions)?
* [ ] Does your PR title have the correct [title format](https://github.com/amplitude/Amplitude-iOS/blob/main/CONTRIBUTING.md#pr-commit-title-conventions)?
* Does your PR have a breaking change?: <!-- Yes or no -->
22 changes: 22 additions & 0 deletions .github/workflows/jira-issue-create.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Creates jira tickets for new github issues to help triage
name: Jira Issue Creator For iOS

on:
issues:
types: [opened]
workflow_call:
inputs:
label:
type: string

jobs:
call-workflow-passing-data:
uses: amplitude/Amplitude-TypeScript/.github/workflows/jira-issue-create-template.yml@main
with:
label: "iOS"
subcomponent: "dx_ios_sdk"
secrets:
JIRA_BASE_URL: ${{ secrets.JIRA_BASE_URL }}
JIRA_USER_EMAIL: ${{ secrets.JIRA_USER_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_API_TOKEN }}
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
235 changes: 114 additions & 121 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ on:
workflow_dispatch:
inputs:
dryRun:
description: 'Do a dry run to preview instead of a real release'
description: "Do a dry run to preview instead of a real release"
required: true
default: 'true'
default: "true"

jobs:
authorize:
name: Authorize
runs-on: macos-10.14
runs-on: macos-12
steps:
- name: ${{ github.actor }} permission check to do a release
uses: octokit/request-action@v2.0.0
uses: octokit/request-action@v2.1.9
with:
route: GET /repos/:repository/collaborators/${{ github.actor }}
repository: ${{ github.repository }}
Expand All @@ -23,124 +23,117 @@ jobs:

release:
name: Release
runs-on: macos-10.14
runs-on: macos-12
needs: [authorize]
strategy:
matrix:
ruby-version: ["2.7.x"]
node-version: ["12.x"]
ruby-version: ["2.7"]
node-version: ["16.x"]
steps:
- name: Checkout Amplitude-iOS
uses: actions/checkout@v2

- name: Set Xcode 12
run: |
sudo xcode-select -switch /Applications/Xcode_12.app
- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}

- name: Cache Bundle Gems and Cocoapods
id: cache-gems-pods
uses: actions/cache@v2
with:
path: |
Pods
vendor/bundle
key: ${{ runner.os }}-ruby-${{ matrix.ruby-version }}-gems-${{ hashFiles('**/Gemfile.lock') }}-pods-${{ hashFiles('**/Podfile.lock') }}

- name: Install Cocoapods
if: steps.cache-gems-pods.outputs.cache-hit != 'true'
run: |
gem install bundler
bundle config path vendor/bundle
bundle install
pod install
- name: iOS Tests
run: |
xcodebuild test \
-workspace Amplitude.xcworkspace \
-scheme Amplitude_iOSTests \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 11,OS=14.0'
# - name: macOS Tests @TODO Fix flaky macOS tests and re-enable
# run: |
# xcodebuild \
# -workspace Amplitude.xcworkspace \
# -scheme Amplitude_macOS \
# -sdk macosx \
# -destination 'platform=macosx' \
# test

- name: tvOS Tests
run: |
xcodebuild \
-workspace Amplitude.xcworkspace \
-scheme Amplitude_tvOS \
-sdk appletvsimulator \
-destination 'platform=tvOS Simulator,name=Apple TV' \
test
- name: Validate Podfile
run: pod lib lint

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Checkout Amplitude-iOS gh-pages for building docs
uses: actions/checkout@v2
with:
ref: 'gh-pages'
path: 'Amplitude-iOS-gh-pages'

- name: Install appledoc binary
run: |
git clone git://github.com/tomaz/appledoc.git
cd appledoc/
sudo sh install-appledoc.sh
cd ../
rm -rf appledoc/
- name: Semantic Release --dry-run
if: ${{ github.event.inputs.dryRun == 'true'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: amplitude-sdk-bot
GIT_COMMITTER_EMAIL: [email protected]
run: |
npx \
-p lodash \
-p semantic-release@17 \
-p @semantic-release/changelog@5 \
-p @semantic-release/git@9 \
-p @google/semantic-release-replace-plugin@1 \
-p @semantic-release/exec@5 \
semantic-release --dry-run
- name: Semantic Release
if: ${{ github.event.inputs.dryRun == 'false'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: amplitude-sdk-bot
GIT_COMMITTER_EMAIL: [email protected]
run: |
npx \
-p lodash \
-p semantic-release@17 \
-p @semantic-release/changelog@5 \
-p @semantic-release/git@9 \
-p @google/semantic-release-replace-plugin@1 \
-p @semantic-release/exec@5 \
semantic-release
- name: Checkout Amplitude-iOS
uses: actions/checkout@v2

- name: Set Xcode 14
run: |
sudo xcode-select -switch /Applications/Xcode_14.1.app
- name: Carthage Bootstrap
run: carthage bootstrap --use-xcframeworks

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}

- name: Install Cocoapods
run: |
gem install bundler -v 2.4.22
bundle config path vendor/bundle
bundle install
pod install
- name: iOS Tests
run: |
xcodebuild test \
-workspace Amplitude.xcworkspace \
-scheme Amplitude_iOSTests \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 14'
# - name: macOS Tests @TODO Fix flaky macOS tests and re-enable
# run: |
# xcodebuild \
# -workspace Amplitude.xcworkspace \
# -scheme Amplitude_macOS \
# -sdk macosx \
# -destination 'platform=macosx' \
# test

- name: tvOS Tests
run: |
xcodebuild \
-workspace Amplitude.xcworkspace \
-scheme Amplitude_tvOS \
-sdk appletvsimulator \
-destination 'platform=tvOS Simulator,name=Apple TV' \
test
- name: Validate Podfile
run: pod lib lint

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Checkout Amplitude-iOS gh-pages for building docs
uses: actions/checkout@v2
with:
ref: "gh-pages"
path: "Amplitude-iOS-gh-pages"

- name: Install appledoc binary
run: |
git clone https://github.com/amplitude/appledoc
cd appledoc/
sudo sh install-appledoc.sh
cd ../
sudo rm -rf appledoc/
- name: Semantic Release --dry-run
if: ${{ github.event.inputs.dryRun == 'true'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: amplitude-sdk-bot
GIT_COMMITTER_EMAIL: [email protected]
run: |
npx \
-p lodash \
-p semantic-release@17 \
-p @semantic-release/changelog@5 \
-p @semantic-release/git@9 \
-p @google/[email protected] \
-p @semantic-release/exec@5 \
semantic-release --dry-run
- name: Semantic Release
if: ${{ github.event.inputs.dryRun == 'false'}}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COCOAPODS_TRUNK_TOKEN: ${{ secrets.COCOAPODS_TRUNK_TOKEN }}
GIT_AUTHOR_NAME: amplitude-sdk-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: amplitude-sdk-bot
GIT_COMMITTER_EMAIL: [email protected]
run: |
npx \
-p lodash \
-p semantic-release@17 \
-p @semantic-release/changelog@5 \
-p @semantic-release/git@9 \
-p @google/[email protected] \
-p @semantic-release/exec@5 \
semantic-release
6 changes: 3 additions & 3 deletions .github/workflows/semantic-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ on:
types: [opened, synchronize, edited]

jobs:
pr-title-check:
pr-title-check:
name: Check PR for semantic title
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- name: PR title is valid
if: >
Expand Down Expand Up @@ -39,5 +39,5 @@ jobs:
!startsWith(github.event.pull_request.title, 'chore:') && !startsWith(github.event.pull_request.title, 'chore(') &&
!startsWith(github.event.pull_request.title, 'revert:') && !startsWith(github.event.pull_request.title, 'revert(')
run: |
echo 'Pull request title is not valid. Please check github.com/amplitude/Amplitude-JavaScript/blob/master/CONTRIBUTING.md#pr-commit-title-conventions'
echo 'Pull request title is not valid. Please check github.com/amplitude/Amplitude-JavaScript/blob/main/CONTRIBUTING.md#pr-commit-title-conventions'
exit 1
Loading

0 comments on commit bc7398e

Please sign in to comment.