Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
luongvo committed Aug 28, 2023
1 parent 8ff584b commit de0b400
Showing 1 changed file with 35 additions and 28 deletions.
63 changes: 35 additions & 28 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,40 +13,40 @@ jobs:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Check out
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
submodules: "recursive"
# - name: Check out
# uses: actions/checkout@v3
# with:
# ref: ${{ github.head_ref }}
# submodules: "recursive"

- name: Preserve the ArkanaKeys (avoid code change in git when refreshing the "sample" project)
run: mv -f ./sample/ios/ArkanaKeys ../
# - name: Preserve the ArkanaKeys (avoid code change in git when refreshing the "sample" project)
# run: mv -f ./sample/ios/ArkanaKeys ../

- name: Remove the old sample project
run: rm -rf sample
# - name: Remove the old sample project
# run: rm -rf sample

- name: Generate the new sample project
run: ./make.sh --bundle-id co.nimblehq.kmm.template --bundle-id-staging co.nimblehq.kmm.template.staging --project-name sample --ios-version 14.0
# - name: Generate the new sample project
# run: ./make.sh --bundle-id co.nimblehq.kmm.template --bundle-id-staging co.nimblehq.kmm.template.staging --project-name sample --ios-version 14.0

- name: Restore the previous ArkanaKeys's keys
run: |
rm -rf ./sample/ios/ArkanaKeys
mv -f ../ArkanaKeys ./sample/ios
# - name: Restore the previous ArkanaKeys's keys
# run: |
# rm -rf ./sample/ios/ArkanaKeys
# mv -f ../ArkanaKeys ./sample/ios

- id: changes
name: Check for changes in the sample project
run: |
count=$(git status sample --porcelain | wc -l)
echo "count=$count" >> $GITHUB_OUTPUT
# - id: changes
# name: Check for changes in the sample project
# run: |
# count=$(git status sample --porcelain | wc -l)
# echo "count=$count" >> $GITHUB_OUTPUT

- name: Commit & push the sample project changes
if: steps.changes.outputs.count > 0
run: |
git config user.name team-nimblehq
git config user.email [email protected]
git add sample
git commit -m "[Chore] Generate & update sample project"
git push
# - name: Commit & push the sample project changes
# if: steps.changes.outputs.count > 0
# run: |
# git config user.name team-nimblehq
# git config user.email [email protected]
# git add sample
# git commit -m "[Chore] Generate & update sample project"
# git push

android_test:
needs: [generate_sample]
Expand Down Expand Up @@ -166,6 +166,13 @@ jobs:
# - name: Clean up previous code coverage report
# run: bundle exec fastlane cleanUpOutput

- name: Fix running Danger SwiftFormat from non-root directory
run: |
gem which danger
gem which danger-swiftformat
# Insert a map operator in the "find_swift_files" method to remove "sample/ios/" prefix from all files.
sed -i '' "s/.uniq/.uniq.map { |file| file.partition('sample\/ios\/').last }/g" '/Users/luongvo/.rvm/gems/ruby-3.0.0/gems/danger-swiftformat-0.8.1/lib/swiftformat/plugin.rb'
- name: Run Danger to wrap up the review
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down

0 comments on commit de0b400

Please sign in to comment.