Update ci.yml #995
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: CI | |
on: | |
pull_request: | |
push: | |
branches: | |
- master | |
- internal-robot | |
workflow_dispatch: | |
schedule: | |
- cron: "0 0 * * *" | |
jobs: | |
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@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
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 dev 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 | |
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' >> /etc/hosts" | |
docker/sdk up -t -v | |
- name: Custom commands | |
continue-on-error: true | |
run: | | |
docker/sdk cli composer dump-autoload -o -a | |
docker/sdk testing console queue:worker:start --stop-when-empty | |
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty | |
- name: Run Tests | |
run: | | |
cd robotframework-tests | |
robot -v env:api_mp_b2c -v ignore_console:false --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.mp_b2c . | |
- 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}}/robot-ci-for-testing/b2c-mp-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@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: Install packages | |
run: | | |
sudo apt-get update | |
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 dev 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 | |
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' >> /etc/hosts" | |
docker/sdk up -t -v | |
- name: Custom commands | |
continue-on-error: true | |
run: | | |
docker/sdk cli composer dump-autoload -o -a | |
docker/sdk testing console queue:worker:start --stop-when-empty | |
APPLICATION_STORE=AT docker/sdk console queue:worker:start --stop-when-empty | |
- name: Run Tests | |
run: | | |
cd robotframework-tests | |
robot -v env:api_mp_b2c -v db_engine:psycopg2 -v ignore_console:false --exclude skip-due-to-issueORskip-due-to-refactoring -d results -s tests.api.mp_b2c . | |
- 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}}/robot-ci-for-testing/b2c-mp-robot-api-ci/${GITHUB_RUN_ID}/PHP8.1PostgreSQLRobot/ \ | |
--recursive \ | |
--expires "$(date -d '+7 days' --utc +'%Y-%m-%dT%H:%M:%SZ')" |