2022-08-18 16:32:29 +03:00
|
|
|
name: Integration tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
schedule:
|
2023-07-13 16:10:41 +01:00
|
|
|
- cron: '0 6,18 * * *'
|
2022-08-18 16:32:29 +03:00
|
|
|
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
integration_tests:
|
|
|
|
name: Integration Tests
|
2023-06-23 13:44:33 +01:00
|
|
|
runs-on: perf-only
|
2022-08-18 16:32:29 +03:00
|
|
|
|
|
|
|
concurrency:
|
|
|
|
# Only allow a single run of this workflow on each branch, automatically cancelling older runs.
|
|
|
|
group: integration-tests-${{ github.head_ref }}
|
2023-07-07 09:56:29 +01:00
|
|
|
cancel-in-progress: false
|
2022-08-18 16:32:29 +03:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: actions/cache@v3
|
|
|
|
with:
|
|
|
|
path: vendor/bundle
|
|
|
|
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
|
|
|
restore-keys: |
|
|
|
|
${{ runner.os }}-gems-
|
|
|
|
|
2023-02-13 14:53:01 +02:00
|
|
|
- name: Setup environment
|
|
|
|
run:
|
|
|
|
source ci_scripts/ci_common.sh && setup_github_actions_environment
|
2022-08-18 16:32:29 +03:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: bundle exec fastlane integration_tests
|
|
|
|
env:
|
|
|
|
INTEGRATION_TESTS_HOST: ${{ secrets.INTEGRATION_TESTS_HOST }}
|
|
|
|
INTEGRATION_TESTS_USERNAME: ${{ secrets.INTEGRATION_TESTS_USERNAME }}
|
|
|
|
INTEGRATION_TESTS_PASSWORD: ${{ secrets.INTEGRATION_TESTS_PASSWORD }}
|
2024-02-28 18:01:20 +00:00
|
|
|
|
|
|
|
- name: Zip results # for faster upload
|
|
|
|
if: failure()
|
|
|
|
working-directory: fastlane/test_output
|
|
|
|
run: zip -r IntegrationTests.xcresult.zip IntegrationTests.xcresult
|
2023-05-15 15:42:40 +02:00
|
|
|
|
|
|
|
- name: Archive artifacts
|
|
|
|
uses: actions/upload-artifact@v3
|
2024-02-28 18:01:20 +00:00
|
|
|
if: failure()
|
2023-05-15 15:42:40 +02:00
|
|
|
with:
|
2024-02-28 18:01:20 +00:00
|
|
|
name: Results
|
|
|
|
path: fastlane/test_output/IntegrationTests.xcresult.zip
|
2023-05-15 15:42:40 +02:00
|
|
|
retention-days: 7
|
|
|
|
if-no-files-found: ignore
|
2022-08-18 16:32:29 +03:00
|
|
|
|
2023-06-09 09:44:50 +01:00
|
|
|
- name: Archive raw log file
|
|
|
|
uses: actions/upload-artifact@v3
|
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: raw.log
|
|
|
|
path: ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log
|
|
|
|
retention-days: 2
|
|
|
|
if-no-files-found: ignore
|
|
|
|
|
|
|
|
- name: Checkout gh-pages branch (for perf stats)
|
|
|
|
if: always()
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: gh-pages
|
|
|
|
path: gh-pages
|
|
|
|
|
|
|
|
- name: Post-process archive to obtain performance metrics and upload to gh-pages
|
|
|
|
if: always()
|
|
|
|
run: |
|
|
|
|
./Tools/Scripts/parsePerformanceMetrics.sh ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log $GITHUB_SHA | tee perf-results.csv
|
|
|
|
cat perf-results.csv >> $GITHUB_WORKSPACE/gh-pages/performance/perf-data.csv
|
|
|
|
cd $GITHUB_WORKSPACE/gh-pages/performance/
|
|
|
|
git add .
|
|
|
|
git commit -m "Results for $GITHUB_SHA"
|
|
|
|
git push
|
|
|
|
|
2024-02-28 18:01:20 +00:00
|
|
|
- name: Collect coverage
|
|
|
|
run: xcresultparser -q -o cobertura -t ElementX -p $(pwd) fastlane/test_output/IntegrationTests.xcresult > fastlane/test_output/integration-cobertura.xml
|
|
|
|
|
2022-12-08 10:09:18 +02:00
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
uses: codecov/codecov-action@v3
|
|
|
|
with:
|
|
|
|
flags: integrationtests
|
|
|
|
|