Skip to content

Instantly share code, notes, and snippets.

View DoguD's full-sized avatar
🎯
Focusing

Doğu Deniz Uğur DoguD

🎯
Focusing
View GitHub Profile
@DoguD
DoguD / config.yml
Last active February 11, 2021 22:31 — forked from alexttransisland/gist:e8ebb98f769d31d7d0a0111550eb4bd8
Run Android emulator on CircleCI 2.0 macOS
version: 2
reference:
## Constants
gradle_cache_path: &gradle_cache_path
gradle_cache-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
workspace: &workspace
~/src
## Configurations
android_config: &android_config
working_directory: *workspace
@DoguD
DoguD / start_recording.scpt
Created July 13, 2019 14:28
Applescript which starts screen recording.
tell application "QuickTime Player"
set recording to new screen recording
tell recording
start
delay 3
end tell
end tell
@DoguD
DoguD / stop_recording.scpt
Created July 13, 2019 15:00
Applescript which stops screen recording
tell application "QuickTime Player"
set recording to document "screen recording"
tell recording
pause
set current_path to do shell script "pwd"
set file_path to current_path & "/testrecording.mov"
save in (file_path as POSIX file)
-- export in ("../testrecording.mov" as POSIX file) using settings preset "480p"
stop
return "Test recording saved to " & file_path
@DoguD
DoguD / circleci_video_recording_config.yml
Last active July 13, 2019 15:10
CircleCI config file which records the XCTests.
version: 2
references:
## Paths
test_video_mp4_path: &test_video_mp4_path
/Users/distiller/src/testrecording.mp4
test_video_mov_path: &test_video_mov_path
/Users/distiller/src/testrecording.mov
workspace: &workspace
~/src
@DoguD
DoguD / Fastfile
Last active July 21, 2019 14:21
Fastfile which will record XC Tests
default_platform(:ios)
platform :ios do
slack_url = "<YOUR-SLACK-WEBHOOK>"
video_finished = false
before_all do
setup_circle_ci
end
@DoguD
DoguD / circleci_android_tests.yml
Created July 26, 2019 12:09
An example Circle CI configuration for running Android tests.
version: 2
reference:
## Paths
gradle_cache_path: &gradle_cache_path
gradle_cache-{{ checksum "build.gradle" }}-{{ checksum "app/build.gradle" }}
gems_cache_path: &gems_cache_path
gems_cache-{{ checksum "Gemfile.lock" }}
workspace: &workspace
~/src
workflows:
version: 2
commit-workflow:
jobs:
- ui_test
- run:
name: Setup environment variables
command: |
echo 'export PATH="$PATH:/usr/local/opt/node@8/bin:${HOME}/.yarn/bin:${HOME}/${CIRCLE_PROJECT_REPONAME}/node_modules/.bin:/usr/local/share/android-sdk/tools/bin"' >> $BASH_ENV
echo 'export ANDROID_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
echo 'export ANDROID_SDK_HOME="/usr/local/share/android-sdk"' >> $BASH_ENV
echo 'export ANDROID_SDK_ROOT="/usr/local/share/android-sdk"' >> $BASH_ENV
echo 'export QEMU_AUDIO_DRV=none' >> $BASH_ENV
echo 'export JAVA_HOME=/Library/Java/Home' >> $BASH_ENV
- run:
name: Install Android sdk
command: |
HOMEBREW_NO_AUTO_UPDATE=1 brew tap homebrew/cask
HOMEBREW_NO_AUTO_UPDATE=1 brew cask install android-sdk
run:
name: Install emulator
command: (yes | sdkmanager "platform-tools" "platforms;android-26" "extras;intel;Hardware_Accelerated_Execution_Manager" "build-tools;26.0.0" "system-images;android-26;default;x86" "emulator" --verbose) || true