-
Notifications
You must be signed in to change notification settings - Fork 6
81 lines (77 loc) · 4.9 KB
/
b2c-marketplace-regression-api-dms-on.yml
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
name: "[b2c-mp][master][API][DMS-ON]"
on:
schedule:
- cron: '0 23 * * 0-4'
workflow_dispatch:
jobs:
docker-alpine-php-8-2-mariadb-robot-api:
name: "Docker / Alpine / PHP 8.2 / MariaDB / Robot / API / DMS ON"
runs-on: ubuntu-22.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/b2c-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 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.robot.yml
sudo bash -c "echo '127.0.0.1 backend-api.eu.spryker.local backend-api.us.spryker.local backend-gateway.eu.spryker.local backend-gateway.us.spryker.local backoffice.eu.spryker.local backoffice.us.spryker.local glue-backend.eu.spryker.local glue-backend.us.spryker.local glue-storefront.eu.spryker.local glue-storefront.us.spryker.local glue.eu.spryker.local glue.us.spryker.local mail.spryker.local mp.eu.spryker.local mp.us.spryker.local queue.spryker.local scheduler.spryker.local spryker.local swagger.spryker.local yves.eu.spryker.local yves.us.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
SPRYKER_CURRENT_REGION=EU docker/sdk console queue:worker:start --stop-when-empty
- name: Run Tests
id: run_tests
continue-on-error: true
run: |
cd robotframework-tests
robot -v env:api_mp_b2c -v dms:true -v glue_env:http://glue.eu.spryker.local -v bapi_env:http://glue-backend.eu.spryker.local -v sapi_env:http://glue-storefront.eu.spryker.local -v ignore_console:false -d results --exclude skip-due-to-issueORskip-due-to-refactoring -s '*'.tests.api.mp_b2c .
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:api_mp_b2c -v dms:true -v glue_env:http://glue.eu.spryker.local -v bapi_env:http://glue-backend.eu.spryker.local -v sapi_env:http://glue-storefront.eu.spryker.local -v ignore_console:false -d results/rerun --runemptysuite --rerunfailed results/output.xml --output rerun.xml -s '*'.tests.api.mp_b2c .
- 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-api-ci/b2c_mp_regression-dms-on/${GITHUB_RUN_ID}/PHP8.2MariaDBRobotAPI/ \
--recursive \
--expires "$(date -d '+4 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"