Skip to content

Add Feature to submit packages from proxy #346

Add Feature to submit packages from proxy

Add Feature to submit packages from proxy #346

Workflow file for this run

name: "Run Tests"
on:
push:
paths:
- 'src/**'
- 'tests/**'
- 'templates/**'
- 'config/**'
- 'composer.lock'
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
env:
APP_ENV: test
jobs:
tests:
strategy:
fail-fast: false
matrix:
include:
- php: '8.1'
driver: 'SQLITE'
redis: 6
symfony: '6.4.*'
- php: '8.2'
driver: 'PGSQL'
redis: 6
symfony: '6.4.*'
- php: '8.3'
driver: 'MYSQL'
redis: 6
symfony: '6.4.*'
- php: '8.4'
driver: 'SQLITE'
redis: 7
symfony: '7.1.*'
composer_flags: '--ignore-platform-reqs'
name: PHP ${{ matrix.php }} ${{ matrix.driver }} SF ${{ matrix.symfony }}
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
extensions: "curl, pdo, pdo_sqlite, pdo_mysql, pdo_pgsql, sqlite, zip, redis"
php-version: ${{ matrix.php }}
tools: composer
- name: "Install Postgres"
if: ${{ matrix.driver=='PGSQL' }}
uses: harmon758/postgresql-action@v1
with:
postgresql version: '14'
postgresql password: '123456'
postgresql db: 'packeton'
- name: "Install MySql"
if: ${{ matrix.driver=='MYSQL' }}
uses: mirromutth/[email protected]
with:
mysql version: '8.0'
mysql database: 'packeton'
mysql root password: '123456'
- name: "Install dependencies"
run: |
set -x
echo $DATABASE_URL
if [[ "${{ matrix.symfony }}" != "6.4.*" ]]; then
export SYMFONY_REQUIRE="${{ matrix.symfony }}"
composer update --ansi --no-interaction ${{ matrix.composer_flags }}
else
composer install --ansi --no-interaction ${{ matrix.composer_flags }}
fi
- name: Start Redis
uses: "supercharge/[email protected]"
with:
redis-version: ${{ matrix.redis }}
- name: "Prepare Postgres"
if: ${{ matrix.driver=='PGSQL' }}
run: |
set -x
echo 'DATABASE_URL="postgresql://postgres:[email protected]/packeton?serverVersion=14.0&charset=utf8"' >> .env.test;
bin/console doctrine:schema:update --force --complete
gunzip -c tests/dump/test.db.gz > tests/dump/test.db
php tests/import_db.php sqlite:////${PWD}/tests/dump/test.db postgresql://postgres:[email protected]/packeton
- name: "Prepare MySql"
if: ${{ matrix.driver=='MYSQL' }}
run: |
set -x
echo 'DATABASE_URL="mysql://root:[email protected]/packeton?serverVersion=8.0&charset=utf8mb4"' >> .env.test;
bin/console doctrine:schema:update --force --complete
gunzip -c tests/dump/test.db.gz > tests/dump/test.db
php tests/import_db.php sqlite:////${PWD}/tests/dump/test.db mysql://root:[email protected]:3306/packeton
- name: "Run tests"
run: "composer tests"