-
Notifications
You must be signed in to change notification settings - Fork 7
174 lines (167 loc) · 7.31 KB
/
auto_test_ios.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: Auto test iOS
on:
# schedule:
# - cron: '0 19 * * *'
workflow_dispatch:
# push:
# branches:
# - develop
jobs:
build:
runs-on: [self-hosted, macOS, ARM, auto-ios]
steps:
# Checkout code and get packages.
- name: Checkout code
uses: actions/checkout@v3
# Set build number
- name: Set env
run: |
echo "FLUTTER_VERSION_NAME=0.100.0" >> $GITHUB_ENV
echo "FLUTTER_VERSION_CODE=10" >> $GITHUB_ENV
echo "BRANCH_KEY=${{ secrets.BRANCH_KEY }}" >> $GITHUB_ENV
echo "BRANCH_KEY_TEST=${{ secrets.BRANCH_KEY_TEST }}" >> $GITHUB_ENV
- name: SSH key
uses: webfactory/[email protected]
with:
ssh-private-key: |
${{ secrets.KEY_VAULT_DEPLOYMENT_KEY }}
${{ secrets.SSH_ASSETS_KEY }}
${{ secrets.SUBMODULE_AUTOTEST }}
- name: Create env file
run: |
touch .env
echo AUTO_TEST_PLATFORM=ios >> .env
echo AUTO_TEST_PROFILE=XsmaxBitmark >> .env
echo FASTLAN_ENV=test >> $GITHUB_ENV
echo AUTOTEST_ENV= "${{ secrets.AUTOTEST_ENV }}" | sed 's/\\n/\n/g' >> .env
cat .env
- name: Submoudles update
run: git -c submodule.auto-test.update=none submodule update --init --recursive
- run: flutter pub cache repair
- run: flutter pub get
# Build app
- name: Build and deploy with Fastlane
env:
ENTERPRISE_CERTIFICATE_PASSWORD: ${{ secrets.ENTERPRISE_CERTIFICATE_PASSWORD }}
APPSTORE_CERTIFICATE_PASSWORD: ${{ secrets.APPSTORE_CERTIFICATE_PASSWORD }}
JSON_FILE: ${{ secrets.JSON_FILE }}
SENTRY_AUTH: ${{ secrets.SENTRY_AUTH }}
APPCENTER_API_TOKEN: ${{ secrets.APPCENTER_API_TOKEN }}
APP_VERSION: ${{ inputs.version }}
BRANCH_KEY: ${{ secrets.BRANCH_KEY }}
RELEASE_NOTES: ${{ inputs.message }}
run: |
git clone [email protected]:bitmark-inc/mobile-signing-key-vault.git --depth 1
echo $JSON_FILE >> key.json
bundle exec fastlane install_plugins
echo "APP_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
bundle exec fastlane ciappcenter env:${{ env.FASTLAN_ENV }}
working-directory: ios
# - name: Build to IPA inhouse app
# run: flutter build ipa --flavor inhouse --export-options-plist ios/ExportOptions-Inhouse.plist
- name: Submoudles update again
run: git submodule update --init --recursive
- name: CD to auto-test folder
run: |
cd auto-test
npm install
appium-webdriveragent % xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=00008020-00095D1C2230003A' test
# Run testing in Cucumber
- name: Run auto tests for Suite "Import accounts from seeds"
if: success() || failure()
run: |
cd auto-test
npx cucumber-js ./src/features/*.feature --format ./reporter.js
# Run integration test
# - name: Run Flutter Driver tests for Suite "Link account from MetaMask app"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_app/linkaccountbyMetamaskapp_test.dart
# - name: Run Flutter Driver tests for Suite "Import accounts from seeds"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/import_fullaccount_kukai_temple_test.dart
# - name: Run Flutter Driver tests for Suite "Connect wallet to NFT exchanges"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_webs/connectWalletToExchanges_test.dart
# - name: Run Flutter Driver tests for Suite "Link Ethereum Wallet"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_webs/linkEthereumAccountWallet_test.dart
# - name: Run Flutter Driver tests for Suite "Link Ethereum Wallet" without finishing Onboarding
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_webs/linkEthereumAccountWalletOnboarding_test.dart
# - name: Run Flutter Driver tests for Suite "Purchase Tez NFT"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_webs/purchase_tez_nft_test.dart
# - name: Run auto tests for Suite "Purchase Feral File NFT"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/mobile_external_webs/purchaseFeralFileEthereumToken_test.dart
# - name: Run Flutter Driver tests for Suite "Send/transfer artworks"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/send_artwork_test.dart
# - name: Run Flutter Driver tests for Suite "Check static pages, build"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/setting_footer_test.dart
# - name: Run Flutter Driver tests for Suite "Check artwork details"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/check_artwork_detail_test.dart
# - name: Run Flutter Driver tests for Suite "Create new account"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/create_new_account_test.dart
# - name: Run Flutter Driver tests for Suite "Customer support"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/customer_support_test.dart
# - name: Run Flutter Driver tests for Suite "Check deposit testcases"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/send_xtz_test.dart
# - name: Run auto tests for Suite "Check deposit ETH testcases"
# if: success() || failure()
# run: |
# cd $GITHUB_WORKSPACE
# flutter test auto-test/tests/send_eth_test.dart
- name: Generate report
run: |
allure generate allure-results --clean -o allure-report
- name: Show report
if: always()
uses: actions/upload-artifact@v3
with:
name: Test result
path: ${{ github.workspace }}/auto-test/allure-report/index.html
- name: Report Status
if: always()
uses: ravsamhq/notify-slack-action@v2
with:
status: ${{ job.status }}
notify_when: "failure,success,warnings"
notification_title: Auto test execution-"{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on commit <{commit_url}|{commit_sha}>"
message_format: "{emoji} *{workflow}* {status_message} in <{repo_url}|{repo}@{branch}> on commit <{commit_url}|{commit_sha}>"
footer: "<{run_url}|View Run>"
mention_users: "U03NZ7JU8KC"
mention_users_when: "failure,warnings"
env:
SLACK_WEBHOOK_URL: ${{ secrets.WEBHOOK_LOCAL_BITMARKVN_CI_SLACK }}