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
|
2024-09-27 16:13:46 +03: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:
|
2024-05-20 10:12:28 +00:00
|
|
|
- uses: actions/checkout@v4
|
2022-08-18 16:32:29 +03:00
|
|
|
|
2024-05-17 21:23:02 +00:00
|
|
|
- uses: actions/cache@v4
|
2022-08-18 16:32:29 +03:00
|
|
|
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
|
2024-09-26 16:09:01 +01:00
|
|
|
|
2024-09-27 15:08:47 +03:00
|
|
|
- name: Delete old log files
|
|
|
|
run: find '/Users/Shared' -name 'console*' -delete
|
2024-09-26 16:09:01 +01:00
|
|
|
|
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
|
|
|
|
2024-09-26 10:15:09 +03:00
|
|
|
- name: Check logs are set to the `trace` level
|
|
|
|
run: (grep ' TRACE ' /Users/Shared -qR)
|
|
|
|
|
|
|
|
- name: Check logs don't contain private messages
|
2024-09-27 15:08:47 +03:00
|
|
|
run: "! grep 'Go down in flames' /Users/Shared -R"
|
2024-09-26 10:15:09 +03:00
|
|
|
|
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
|
2024-05-20 10:17:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
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
|
2024-05-20 10:17:57 +00:00
|
|
|
uses: actions/upload-artifact@v4
|
2023-06-09 09:44:50 +01:00
|
|
|
if: always()
|
|
|
|
with:
|
|
|
|
name: raw.log
|
|
|
|
path: ~/Library/Logs/scan/IntegrationTests-IntegrationTests.log
|
|
|
|
retention-days: 2
|
|
|
|
if-no-files-found: ignore
|
|
|
|
|
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
|
2024-09-10 11:29:45 +03:00
|
|
|
uses: codecov/codecov-action@v3
|
2022-12-08 10:09:18 +02:00
|
|
|
with:
|
2024-04-22 14:59:51 +02:00
|
|
|
fail_ci_if_error: true
|
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2022-12-08 10:09:18 +02:00
|
|
|
flags: integrationtests
|
2024-09-27 17:49:14 +03:00
|
|
|
version: v0.7.3
|
2022-12-08 10:09:18 +02:00
|
|
|
|
2024-09-12 07:09:15 +01:00
|
|
|
- name: Collect test results
|
|
|
|
if: ${{ !cancelled() }}
|
|
|
|
run: xcresultparser -q -o junit -p $(pwd) fastlane/test_output/IntegrationTests.xcresult > fastlane/test_output/integration-junit.xml
|
|
|
|
|
|
|
|
- name: Upload test results to Codecov
|
|
|
|
if: ${{ !cancelled() }}
|
|
|
|
uses: codecov/test-results-action@v1
|
2024-09-18 14:29:20 +03:00
|
|
|
continue-on-error: true
|
2024-09-12 07:09:15 +01:00
|
|
|
with:
|
2024-09-18 14:29:20 +03:00
|
|
|
fail_ci_if_error: false
|
2024-09-12 07:09:15 +01:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
|
|
flags: integrationtests
|