Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CircleCi to Github actions migration #33

Merged
merged 18 commits into from
Dec 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 0 additions & 125 deletions .circleci/config.yml

This file was deleted.

144 changes: 144 additions & 0 deletions .github/workflows/ios-sdk-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
name: "iOS SDK CI"

on:
pull_request:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-*

jobs:
setup:
name: "Setup"
runs-on: macos-13
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Install ruby and gem dependencies
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.0.7
bundler-cache: true # runs 'bundle install' and caches installed gems automatically

sdk-tests:
name: "SDK Tests"
runs-on: macos-13
needs: [setup]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Bundle install
run: bundle install
- name: Run Tests
run: bundle exec fastlane tests
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./fastlane/test_output

build-demo-swift:
name: "Build Demo Swift"
runs-on: macos-14
needs: [setup, sdk-tests]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Bundle install
run: bundle install
- name: Build Demo Swift
id: build-demo-swift
run: bundle exec fastlane demo_swift
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: demo-swift
path: ./demo-ios-swift/Pods
- name: Store build log
uses: actions/upload-artifact@v4
with:
name: build-log-swift
path: /Users/runner/Library/Logs/gym


build-demo-objc:
name: "Build Demo Objective-C"
runs-on: macos-14
env:
FL_OUTPUT_DIR: output
needs: [setup, sdk-tests]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Bundle install
run: bundle install
- name: Build Demo Objective-C
run: bundle exec fastlane demo_objc
- name: Store Artifacts
uses: actions/upload-artifact@v4
with:
name: demo-objc
path: ./demo-ios-objc/Pods
- name: Store build log
uses: actions/upload-artifact@v4
with:
name: build-log-objc
path: /Users/runner/Library/Logs/gym

slack-notification:
runs-on: ubuntu-22.04
needs: [build-demo-swift, build-demo-objc]
permissions:
id-token: write
steps:
- name: Successful Release Post to Slack
uses: slackapi/[email protected]
if: ${{ success() && (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }}
with:
method: chat.postMessage
token: "${{ secrets.SLACK_MESSENGER_APP_TOKEN }}"
payload: |
channel: "${{ secrets.ALERTS_SLACK_CHANNEL_ID }}"
text: "iOS SDK release: Success\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":certified: iOS SDK release"
emoji: true
- type: "section"
fields:
- type: "mrkdwn"
text: "*Status:*\nSuccess"
- type: "mrkdwn"
text: "*Branch:*\n${{ github.ref_name }}"
- type: "mrkdwn"
text: "*Author:*\n${{ github.actor || github.triggering_actor }}"
- type: "mrkdwn"
text: ":white_check_mark: *iOS SDK release:*\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- name: Build failure Post to Slack
uses: slackapi/[email protected]
if: ${{ failure() && github.event_name == 'pull_request' }}
with:
method: chat.postMessage
token: "${{ secrets.SLACK_MESSENGER_APP_TOKEN }}"
payload: |
channel: "${{ secrets.ALERTS_SLACK_CHANNEL_ID }}"
text: "iOS SDK release: Failure\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
blocks:
- type: "header"
text:
type: "plain_text"
text: ":certified: iOS SDK release"
emoji: true
- type: "section"
fields:
- type: "mrkdwn"
text: "*Status:*\nFailure"
- type: "mrkdwn"
text: "*Branch:*\n${{ github.event.pull_request.head.ref }}"
- type: "mrkdwn"
text: "*Author:*\n${{ github.actor || github.triggering_actor }}"
- type: "mrkdwn"
text: ":x: *iOS SDK release:*\n${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"

2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source "https://rubygems.org"
gem 'fastlane'
gem 'cocoapods'
gem "cocoapods", "= 1.12.0"
Loading