Skip to content

task: make discount and tax amount optional int #49

task: make discount and tax amount optional int

task: make discount and tax amount optional int #49

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
name: Build and Test default scheme using any available iPhone simulator
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Checkout
uses: actions/checkout@v2
- name: Set Default Scheme
run: |
scheme_list=$(xcodebuild -list -json | tr -d "\n")
default=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
echo $default | cat >default
echo Using default scheme: $default
- name: Clean Build Folder
run: |
xcodebuild clean -scheme "gr4vy-ios" -alltargets
- name: Build
env:
scheme: gr4vy-ios
platform: ${{ 'iOS Simulator' }}
run: |
device=$(xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}')
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "$(ls -A | grep -i \\.xcworkspace\$)" ]; then
filetype_parameter="workspace"
file_to_build="$(ls -A | grep -i \\.xcworkspace\$)"
else
filetype_parameter="project"
file_to_build="$(ls -A | grep -i \\.xcodeproj\$)"
fi
file_to_build=$(echo $file_to_build | awk '{$1=$1;print}')
xcodebuild build-for-testing -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO
- name: Test
env:
scheme: gr4vy-iosTests
platform: ${{ 'iOS Simulator' }}
run: |
device=$(xcrun xctrace list devices 2>&1 | grep -oE 'iPhone.*?[^\(]+' | head -1 | awk '{$1=$1;print}')
if [ $scheme = default ]; then scheme=$(cat default); fi
if [ "$(ls -A | grep -i \\.xcworkspace\$)" ]; then
filetype_parameter="workspace"
file_to_build="$(ls -A | grep -i \\.xcworkspace\$)"
else
filetype_parameter="project"
file_to_build="$(ls -A | grep -i \\.xcodeproj\$)"
fi
file_to_build=$(echo $file_to_build | awk '{$1=$1;print}')
xcodebuild test -scheme "$scheme" -"$filetype_parameter" "$file_to_build" -destination "platform=iOS Simulator,name=iPhone 15,OS=latest" CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO