Revision control

Copy as Markdown

format_version: '8'
workflows:
Firefox_Sync_Integration_Tests_Smoketest_Regression:
envs:
- SYNC_PYTEST_ARGS: -m "smoketest or regression"
- SYNC_RESULTS_NAME: sync-integration-smoketests-regressions-result
- SYNC_SLACK_TITLE: Sync Integration Tests Smoketest & Regression
after_run:
- _sync_integration_tests
Firefox_Sync_Integration_Tests:
envs:
- SYNC_PYTEST_ARGS: ''
- SYNC_RESULTS_NAME: sync-integration-result
- SYNC_SLACK_TITLE: Sync Integration Tests
after_run:
- _sync_integration_tests
_sync_integration_tests:
before_run:
- 1_git_clone_and_post_clone
- 2_certificate_and_profile
- 3_provisioning_and_npm_installation
- skip_macro_validation
steps:
- script@1:
title: "Run Firefox Sync Integration Tests"
inputs:
- content: |-
#!/usr/bin/env bash
set -e
HOMEBREW_NO_AUTO_UPDATE=1 brew install python@3.12 pipenv
cd firefox-ios/firefox-ios-tests/Tests/SyncIntegrationTests
if [ -n "${CI_WAF_TOKEN:-}" ]; then echo "CI_WAF_TOKEN is set"; else echo "CI_WAF_TOKEN is NOT set"; exit 1; fi
pipenv install --python 3.12
# Run the tests
PYTEST_EXIT=0
eval pipenv run pytest --junitxml=results/junit.xml $SYNC_PYTEST_ARGS || PYTEST_EXIT=$?
# Collect failed tests from the JUnit XML results
FAILED=$(python3 "$BITRISE_SOURCE_DIR/test-fixtures/ci/list_failed_junit_tests.py" results/junit.xml)
envman add --key SYNC_FAILED_TESTS --value "$FAILED"
# Prepare for upload
RESULTS_DIR="$BITRISE_SOURCE_DIR/$SYNC_RESULTS_NAME-$(date +%Y-%m-%d)"
cp -R results "$RESULTS_DIR"
envman add --key SYNC_INTEGRATION_RESULTS_DIR --value "$RESULTS_DIR"
exit $PYTEST_EXIT
- deploy-to-bitrise-io@2:
is_always_run: true
inputs:
- deploy_path: $SYNC_INTEGRATION_RESULTS_DIR
- is_compress: "true"
- slack@4:
is_always_run: true
inputs:
- title: ''
- author_name: ''
- webhook_url: "$WEBHOOK_SLACK_TOKEN"
- footer_icon: https://emoji.slack-edge.com/T07DB2PSS3W/testops-notify/55edcdb3371320b6.png
- footer: Created by Mobile Test Engineering
- footer_icon_on_error: https://emoji.slack-edge.com/T07DB2PSS3W/testops-notify/55edcdb3371320b6.png
- footer_on_error: Created by Mobile Test Engineering
- pretext_on_error: "*Firefox-iOS* :firefox: *${SYNC_SLACK_TITLE}* :x:"
- message_on_error: "*Failed tests:*\n${SYNC_FAILED_TESTS}"
- color_on_error: danger
- pretext: "*Firefox-iOS* :firefox: *${SYNC_SLACK_TITLE}* :white_check_mark:"
- message: ''
- timestamp: 'no'
- fields: ''
- buttons: |
Build Log|${BITRISE_BUILD_URL}
Test Report|${BITRISE_BUILD_URL}?tab=artifacts