[b2b-mp][master][UI][DMS-OFF] #26
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "[b2b-mp][master][UI][DMS-OFF]" | |
on: | |
schedule: | |
- cron: '0 3 * * 1-5' | |
workflow_dispatch: | |
jobs: | |
docker-alpine-php-8-2-mariadb-robot-ui: | |
name: "Docker / Alpine / PHP 8.2 / MariaDB / Robot / UI / DMS OFF" | |
runs-on: ubuntu-20.04 | |
env: | |
PROGRESS_TYPE: plain | |
SPRYKER_PLATFORM_IMAGE: spryker/php:8.2 | |
TRAVIS: 1 | |
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1 | |
steps: | |
- name: apt update | |
run: sudo apt update | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Clone project (master) | |
run: | | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git config --global user.name "github-actions[bot]" | |
git clone -b master --single-branch https://github.com/spryker-shop/b2b-demo-marketplace.git . | |
- name: Install packages | |
run: | | |
sudo apt-get install apache2-utils | |
sudo apt install awscli -q | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -U robotframework | |
python3 -m pip install -U robotframework-requests | |
python3 -m pip install -U robotframework-jsonlibrary | |
python3 -m pip install -U robotframework-databaselibrary | |
python3 -m pip install -U robotframework-browser | |
python3 -m pip install PyMySQL | |
- name: Install docker-compose | |
run: | | |
sudo curl -L "https://github.com/docker/compose/releases/download/2.12.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
sudo chmod +x /usr/local/bin/docker-compose | |
- name: Install Robot tests | |
run: | | |
git clone https://github.com/spryker/robotframework-suite-tests.git --single-branch --branch master robotframework-tests | |
- name: Install Project | |
continue-on-error: false | |
run: | | |
git clone https://github.com/spryker/docker-sdk.git ./docker | |
docker/sdk boot -v deploy.ci.acceptance.mariadb.dynamic-store-off.robot.yml | |
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.spryker.local glue-backend.de.spryker.local glue-backend.at.spryker.local glue-storefront.de.spryker.local glue-storefront.at.spryker.local backend-gateway.at.spryker.local backend-gateway.de.spryker.local backoffice.at.spryker.local backoffice.de.spryker.local date-time-configurator-example.spryker.local glue.at.spryker.local glue.de.spryker.local yves.at.spryker.local yves.de.spryker.local mp.de.spryker.local mail.spryker.local mp.at.spryker.local' >> /etc/hosts" | |
docker/sdk up -t -v | |
- name: Custom commands | |
continue-on-error: false | |
run: | | |
docker/sdk cli composer dump-autoload -o -a --apcu | |
APPLICATION_STORE=DE docker/sdk console queue:worker:start --stop-when-empty | |
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty | |
- name: Run Tests | |
id: run_tests | |
continue-on-error: true | |
run: | | |
cd robotframework-tests | |
rfbrowser init | |
robot -v env:ui_mp_b2b -v headless:true -v ignore_console:false -d results --exclude skip-due-to-issueORskip-due-to-refactoring --include group_oneORgroup_twoORgroup_tree -s '*'.tests.ui.mp_b2b . | |
touch results/time.txt && echo $(date) > results/time.txt | |
- name: Rerun Failed Tests | |
if: steps.run_tests.outcome != 'success' | |
run: | | |
cd robotframework-tests | |
robot -v env:ui_mp_b2b -v headless:true -v ignore_console:false -d results/rerun --runemptysuite --rerunfailed results/output.xml --output rerun.xml -s '*'.tests.ui.mp_b2b . | |
- name: Merge Test Results | |
if: always() && steps.run_tests.outcome != 'success' | |
run: | | |
cd robotframework-tests | |
rebot -d results --merge results/output.xml results/rerun/rerun.xml | |
- name: Upload artifacts | |
if: failure() | |
run: | | |
AWS_DEFAULT_REGION=${{env.ROBOT_TESTS_ARTIFACTS_BUCKET_REGION}} AWS_ACCESS_KEY_ID=${{ secrets.ROBOT_TESTS_ARTIFACTS_KEY }} AWS_SECRET_ACCESS_KEY=${{ secrets.ROBOT_TESTS_ARTIFACTS_SECRET }} aws s3 cp robotframework-tests/results s3://${{vars.ROBOT_TESTS_ARTIFACTS_BUCKET}}/night-robot-ui-ci/b2b_mp_regression-dms-off/${GITHUB_RUN_ID}/PHP8.2MariaDBRobotUi/ \ | |
--recursive \ | |
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')" |