Automatically assign pull request authors #1675
Workflow file for this run
This file contains 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: Unit testing | |
on: | |
push: | |
branches: | |
- 'feature/**' | |
- 'dependabot/bundler/**' | |
workflow_dispatch: | |
inputs: | |
force_shared: | |
description: 'Force run shared unit tests' | |
required: false | |
default: false | |
type: boolean | |
force_android: | |
description: 'Force run Android unit tests' | |
required: false | |
default: false | |
type: boolean | |
force_ios: | |
description: 'Force run iOS unit tests' | |
required: false | |
default: false | |
type: boolean | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref_name }} | |
cancel-in-progress: true | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
files-changed: | |
name: Detect what files changed | |
uses: ./.github/workflows/detect_changed_files_reusable_workflow.yml | |
shared-unit-testing: | |
needs: files-changed | |
if: ${{ inputs.force_shared || needs.files-changed.outputs.shared == 'true' }} | |
name: Run shared unit tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup CI | |
id: setup | |
uses: ./.github/actions/setup-android | |
with: | |
git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }} | |
- name: Run unit tests | |
run: ./gradlew shared:testReleaseUnitTest | |
env: | |
IS_GIT_CRYPT_UNLOCKED: ${{ steps.setup.outputs.is-git-crypt-unlocked }} | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
android-unit-testing: | |
needs: files-changed | |
if: ${{ inputs.force_android || needs.files-changed.outputs.android == 'true' }} | |
name: Run Android unit tests | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 60 | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup CI | |
id: setup | |
uses: ./.github/actions/setup-android | |
with: | |
git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }} | |
- name: Run unit tests | |
run: ./gradlew androidHyperskillApp:testReleaseUnitTest | |
env: | |
IS_GIT_CRYPT_UNLOCKED: ${{ steps.setup.outputs.is-git-crypt-unlocked }} | |
GITHUB_USER: ${{ github.actor }} | |
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# ios-unit-testing: | |
# needs: files-changed | |
# if: ${{ inputs.force_ios || needs.files-changed.outputs.ios == 'true' }} | |
# name: Run iOS unit tests | |
# runs-on: macos-13 | |
# timeout-minutes: 60 | |
# steps: | |
# - name: Checkout | |
# uses: actions/[email protected] | |
# - name: Setup CI | |
# id: setup | |
# uses: ./.github/actions/setup-ios | |
# with: | |
# git-crypt-key: ${{ secrets.GIT_CRYPT_KEY }} | |
# - name: Run unit tests | |
# working-directory: './iosHyperskillApp' | |
# run: bundle exec fastlane run_unit_tests install_pods:false | |
# env: | |
# FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT: 60 | |
# IS_GIT_CRYPT_UNLOCKED: ${{ steps.setup.outputs.is-git-crypt-unlocked }} | |
# GITHUB_USER: ${{ github.actor }} | |
# GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} |