Skip to content

Commit

Permalink
Merge pull request #182 from spryker-shop/feature/cc-26078/dev-add-ro…
Browse files Browse the repository at this point in the history
…bot-tests

CC-26078: Add robot test
  • Loading branch information
DmitryLymarenko authored Mar 14, 2023
2 parents c6ce7f7 + 9bd14dc commit 70709a5
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -419,3 +419,105 @@ jobs:
- run: docker run -t --rm -e SPRYKER_NGINX_CGI_HOST_YVES_EU=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_EU=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_EU=localhost -e SPRYKER_NGINX_CGI_HOST_YVES_US=localhost -e SPRYKER_NGINX_CGI_HOST_GLUE_US=localhost -e SPRYKER_NGINX_CGI_HOST_ZED_US=localhost -e ALLOWED_IP=127.0.0.1 spryker_b2c_frontend:1.0-frontend nginx -t
- run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Yves/assets/myhash
- run: docker run -t --rm --entrypoint='' spryker_b2c_frontend:1.0-frontend ls -al /data/public/Zed/assets/

docker-alpine-php-8-0-mariadb-robot:
name: "Docker / Alpine / PHP 8.0 / MariaDB / Robot"
runs-on: ubuntu-20.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.0
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v4
with:
python-version: '3.9'

- 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: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.mariadb.yml
docker/sdk up -t -v
docker/sdk testing console queue:worker:start --stop-when-empty
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.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' >> /etc/hosts"
- name: Run Tests
run: |
cd robotframework-tests
robot -v env:api_b2c --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.b2c.glue .
- name: Upload artifacts
if: always()
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}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.0MariaDBRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
docker-alpine-php-8-1-postgresql-robot:
name: "Docker / Alpine / PHP 8.1 / PostgreSQL / Robot"
runs-on: ubuntu-20.04
env:
PROGRESS_TYPE: plain
SPRYKER_PLATFORM_IMAGE: spryker/php:8.1
TRAVIS: 1
ROBOT_TESTS_ARTIFACTS_BUCKET_REGION: eu-west-1
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v4
with:
python-version: '3.9'

- 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 psycopg2-binary
- 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: true
run: |
git clone https://github.com/spryker/docker-sdk.git ./docker
docker/sdk boot -v deploy.ci.acceptance.yml
docker/sdk up -t -v
docker/sdk testing console queue:worker:start --stop-when-empty
sudo bash -c "echo '127.0.0.1 backend-api.at.spryker.local backend-api.de.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' >> /etc/hosts"
- name: Run Tests
run: |
cd robotframework-tests
robot -v env:api_b2c -v db_engine:psycopg2 --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.b2c.glue .
- name: Upload artifacts
if: always()
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}}/b2c-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1PostgreSQLRobot/ \
--recursive \
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')"
3 changes: 3 additions & 0 deletions deploy.ci.acceptance.mariadb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ services:
root:
username: "root"
password: "secret"
endpoints:
localhost:3306:
protocol: tcp
broker:
engine: rabbitmq
version: '3.9'
Expand Down
3 changes: 3 additions & 0 deletions deploy.ci.acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ services:
root:
username: "root"
password: "secret"
endpoints:
localhost:5432:
protocol: tcp
broker:
engine: rabbitmq
version: '3.9'
Expand Down

0 comments on commit 70709a5

Please sign in to comment.