Added tag v1.2.1 #29
Workflow file for this run
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: Robot Framework tests | |
on: | |
pull_request: | |
branches: [ main ] | |
jobs: | |
composer-install: | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: [ '8.1' ] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: zip | |
- name: Install Dependencies | |
env: | |
COMPOSER_AUTH: '{"github-oauth": {"github.com": "${{ secrets.REPO_READ_ONLY_TOKEN }}"}}' | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
robot-tests: | |
needs: | |
- composer-install | |
runs-on: ubuntu-22.04 | |
strategy: | |
max-parallel: 3 | |
matrix: | |
php-versions: [ '8.1' ] | |
services: | |
postgres: | |
image: postgres:12.5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: postgres | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
redis: | |
image: redis:latest | |
ports: | |
- 6379:6379 | |
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
rabbitmq: | |
image: rabbitmq:3.9.7-management | |
env: | |
RABBITMQ_DEFAULT_USER: guest | |
RABBITMQ_DEFAULT_PASS: guest | |
ports: | |
- 5672:5672 | |
- 15672:15672 | |
options: --health-cmd "rabbitmq-diagnostics -q check_running" --health-interval 10s --health-timeout 5s --health-retries 5 | |
tika: | |
image: apache/tika:latest | |
ports: | |
- 9998:9998 | |
elasticsearch: | |
image: elasticsearch:8.2.2 | |
env: | |
discovery.type: single-node | |
cluster.name: elasticsearch | |
bootstrap.memory_lock: "true" | |
ES_JAVA_OPTS: "-Xms512m -Xmx512m" | |
xpack.security.enabled: false | |
ports: | |
- 9200:9200 | |
- 9300:9300 | |
options: --health-cmd "curl -f http://localhost:9200/_cluster/health?wait_for_status=yellow" --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install PHP | |
uses: shivammathur/setup-php@master | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: xdebug, pgsql | |
- uses: actions/cache@v3 | |
with: | |
path: vendor/ | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Copy .env | |
run: cp -n .env.ci .env.local | |
- name: Execute Generate Database Key | |
run: | | |
DBKEY=$(bin/console generate:database-key) | |
echo DATABASE_ENCRYPTION_KEY=${DBKEY:5} >> .env.local | |
cat .env.local | |
- name: Build FE | |
run: | | |
echo "//npm.pkg.github.com/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc | |
npm ci | |
npm run build | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.REPO_READ_ONLY_TOKEN }} | |
- name: Download symfony app | |
run: | | |
wget https://get.symfony.com/cli/installer -O - | bash | |
mv /home/runner/.symfony5/bin/symfony /usr/local/bin/symfony | |
- name: Migrate and seed database | |
run: php bin/console d:m:m -n && php bin/console d:f:l -n | |
- name: Run Symfony Server | |
run: symfony server:start -d | |
# Robot framework setup | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Install Robot Framework dependencies | |
run: | | |
sudo apt-get install --reinstall libpq-dev | |
python -m pip install --upgrade pip | |
pip install -r tests/robot_framework/requirements.txt | |
rfbrowser init | |
- name: Execute tests (Robot Framework) | |
run: | | |
python -m robot -d tests/robot_framework/results -x outputxunit.xml -i CI -v headless:true tests/robot_framework | |
- name: Upload RF test results | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports | |
path: tests/robot_framework/results | |
- name: Publish Robot Framework test results | |
uses: EnricoMi/publish-unit-test-result-action/composite@v2 | |
if: ${{ always() && github.actor != 'dependabot[bot]' }} | |
with: | |
junit_files: tests/robot_framework/results/outputxunit.xml | |
check_name: Robot Framework FE tests |