diff --git a/.azure-pipelines/00-install-less.yml b/.azure-pipelines/00-install-less.yml deleted file mode 100644 index baa1fc6386..0000000000 --- a/.azure-pipelines/00-install-less.yml +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - lessVersion: '' - -steps: - - script: | - npm install -g less@${{ parameters.lessVersion }} - lessc --version - displayName: 'Install Less ${{ parameters.lessVersion }}' diff --git a/.azure-pipelines/00-install-node.yml b/.azure-pipelines/00-install-node.yml deleted file mode 100644 index 7602068bfc..0000000000 --- a/.azure-pipelines/00-install-node.yml +++ /dev/null @@ -1,8 +0,0 @@ -parameters: - nodeVersion: '' - -steps: - - task: NodeTool@0 - inputs: - versionSpec: '${{ parameters.nodeVersion }}.x' - displayName: 'Install Node ${{ parameters.nodeVersion }}' diff --git a/.azure-pipelines/00-install-php-modules.yml b/.azure-pipelines/00-install-php-modules.yml deleted file mode 100644 index a9c790712c..0000000000 --- a/.azure-pipelines/00-install-php-modules.yml +++ /dev/null @@ -1,10 +0,0 @@ -parameters: - phpVersion: '' - -steps: - - script: | - PKG_VERSION=$(sudo apt list --installed | sed -n 's/php${{ parameters.phpVersion }}-fpm\/.* \(.*\) .* .*/\1/p') - - sudo apt update - sudo apt install php-imagick php-mailparse php-redis php${{ parameters.phpVersion }}-intl=$PKG_VERSION php${{ parameters.phpVersion }}-curl=$PKG_VERSION php${{ parameters.phpVersion }}-pgsql=$PKG_VERSION php${{ parameters.phpVersion }}-soap=$PKG_VERSION php${{ parameters.phpVersion }}-xml=$PKG_VERSION php${{ parameters.phpVersion }}-zip=$PKG_VERSION - displayName: 'Install PHP Modules' diff --git a/.azure-pipelines/00-install-postgresql.yml b/.azure-pipelines/00-install-postgresql.yml deleted file mode 100644 index 2160983f79..0000000000 --- a/.azure-pipelines/00-install-postgresql.yml +++ /dev/null @@ -1,11 +0,0 @@ -parameters: - pgsqlVersion: '' - -steps: - - script: | - curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - - echo deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main | sudo tee /etc/apt/sources.list.d/pgdg.list - sudo apt update - sudo apt install postgresql-${{ parameters.pgsqlVersion }} - psql --version - displayName: 'Install PostgreSQL ${{ parameters.pgsqlVersion }}' diff --git a/.azure-pipelines/00-install-redis.yml b/.azure-pipelines/00-install-redis.yml deleted file mode 100644 index 98df0a3cf5..0000000000 --- a/.azure-pipelines/00-install-redis.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: - - script: | - sudo add-apt-repository -y ppa:chris-lea/redis-server - sudo apt update - sudo apt install redis-server - sudo service redis-server start - redis-server --version - displayName: 'Install Redis' diff --git a/.azure-pipelines/10-configure-php.yml b/.azure-pipelines/10-configure-php.yml deleted file mode 100644 index 6680d34d17..0000000000 --- a/.azure-pipelines/10-configure-php.yml +++ /dev/null @@ -1,12 +0,0 @@ -parameters: - phpVersion: '' - -steps: - - script: | - sudo update-alternatives --set php /usr/bin/php${{ parameters.phpVersion }} - sudo update-alternatives --set phar /usr/bin/phar${{ parameters.phpVersion }} - sudo update-alternatives --set phpdbg /usr/bin/phpdbg${{ parameters.phpVersion }} - sudo update-alternatives --set php-cgi /usr/bin/php-cgi${{ parameters.phpVersion }} - sudo update-alternatives --set phar.phar /usr/bin/phar.phar${{ parameters.phpVersion }} - php -version - displayName: 'Use PHP ${{ parameters.phpVersion }}' diff --git a/.azure-pipelines/10-configure-postgresql.yml b/.azure-pipelines/10-configure-postgresql.yml deleted file mode 100644 index 8712f34e80..0000000000 --- a/.azure-pipelines/10-configure-postgresql.yml +++ /dev/null @@ -1,10 +0,0 @@ -parameters: - user: 'litus' - password: 'huQeyU8te3aXusaz' - database: 'litus' - -steps: - - script: | - sudo -u postgres psql -c "CREATE USER ${{ parameters.user }} WITH LOGIN SUPERUSER PASSWORD '${{ parameters.password }}';" - sudo -u postgres psql -c 'CREATE DATABASE ${{ parameters.database }} WITH OWNER ${{ parameters.user }};' - displayName: 'Configure PostgreSQL' diff --git a/.azure-pipelines/20-configure-litus.yml b/.azure-pipelines/20-configure-litus.yml deleted file mode 100644 index 2238f28cd2..0000000000 --- a/.azure-pipelines/20-configure-litus.yml +++ /dev/null @@ -1,8 +0,0 @@ -steps: - - script: | - cp config/database.config.php.dist config/database.config.php - cp config/proxy.config.php.dist config/proxy.config.php - cp config/redis.config.php.dist config/redis.config.php - cp config/sentry.config.php.dist config/sentry.config.php - cp config/session.config.php.dist config/session.config.php - displayName: 'Configure Litus' diff --git a/.azure-pipelines/30-run-composer.yml b/.azure-pipelines/30-run-composer.yml deleted file mode 100644 index a4e2330b03..0000000000 --- a/.azure-pipelines/30-run-composer.yml +++ /dev/null @@ -1,14 +0,0 @@ -steps: - - task: CacheBeta@0 - inputs: - key: composer | $(Agent.OS) | $(Build.SourcesDirectory)/composer.lock - path: $(Build.SourcesDirectory)/vendor - cacheHitVar: CACHE_RESTORED - displayName: 'Cache Composer Packages' - - - script: rm -rf vendor/bin - condition: eq(variables.CACHE_RESTORED, 'true') - displayName: 'Remove Composer Binaries' - - - script: composer install --no-interaction --no-progress --prefer-dist - displayName: 'Run Composer' diff --git a/.azure-pipelines/40-run-phpcs.yml b/.azure-pipelines/40-run-phpcs.yml deleted file mode 100644 index 91e5810e1f..0000000000 --- a/.azure-pipelines/40-run-phpcs.yml +++ /dev/null @@ -1,26 +0,0 @@ -parameters: - cacheDirectory: $(Pipeline.Workspace)/phpcs - reportFile: $(Pipeline.Workspace)/phpcs.xml - -steps: - - task: CacheBeta@0 - inputs: - key: phpcs | $(Agent.OS) | $(Build.SourceVersion) - path: ${{ parameters.cacheDirectory }} - restoreKeys: | - phpcs | $(Agent.OS) - phpcs - displayName: 'Cache PHP_CodeSniffer State' - - - script: mkdir -p ${{ parameters.cacheDirectory }} - displayName: 'Create Cache Directory' - - - script: vendor/bin/phpcs -n -q --cache=${{ parameters.cacheDirectory }}/cache.json --report=junit --report-file=${{ parameters.reportFile }} --runtime-set ignore_errors_on_exit true --runtime-set ignore_warnings_on_exit true - displayName: 'Run PHP_CodeSniffer' - - - task: PublishTestResults@2 - inputs: - testRunner: JUnit - testResultsFiles: ${{ parameters.reportFile }} - failTaskOnFailedTests: true - testRunTitle: PHP_CodeSniffer diff --git a/.azure-pipelines/40-run-phpstan.yml b/.azure-pipelines/40-run-phpstan.yml deleted file mode 100644 index 0c4126bdf3..0000000000 --- a/.azure-pipelines/40-run-phpstan.yml +++ /dev/null @@ -1,22 +0,0 @@ -parameters: - reportFile: $(Pipeline.Workspace)/phpstan.xml - -steps: - - task: CacheBeta@0 - inputs: - key: phpstan | $(Agent.OS) | $(Build.SourceVersion) - path: $(Build.SourcesDirectory)/phpstan - restoreKeys: | - phpstan | $(Agent.OS) - phpstan - displayName: 'Cache PHPStan State' - - - script: vendor/bin/phpstan analyze --error-format=junit --no-interaction --no-progress > ${{ parameters.reportFile }} - displayName: 'Run PHPStan' - - - task: PublishTestResults@2 - inputs: - testRunner: JUnit - testResultsFiles: ${{ parameters.reportFile }} - failTaskOnFailedTests: true - testRunTitle: PHPStan diff --git a/.azure-pipelines/50-run-doctrine.yml b/.azure-pipelines/50-run-doctrine.yml deleted file mode 100644 index 8c53e38ad9..0000000000 --- a/.azure-pipelines/50-run-doctrine.yml +++ /dev/null @@ -1,5 +0,0 @@ -steps: - - script: | - php bin/doctrine.php orm:schema-tool:create - php bin/doctrine.php migrations:version --add --all --no-interaction - displayName: 'Run Doctrine' diff --git a/.azure-pipelines/50-run-install-all.yml b/.azure-pipelines/50-run-install-all.yml deleted file mode 100644 index 4e3e7ed269..0000000000 --- a/.azure-pipelines/50-run-install-all.yml +++ /dev/null @@ -1,3 +0,0 @@ -steps: - - script: php bin/console.php install:all - displayName: 'Run Install All' diff --git a/.azure-pipelines/50-run-update.yml b/.azure-pipelines/50-run-update.yml deleted file mode 100644 index 42a3dcebe6..0000000000 --- a/.azure-pipelines/50-run-update.yml +++ /dev/null @@ -1,3 +0,0 @@ -steps: - - script: bin/update.sh - displayName: 'Run Update' diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 783c7d5da1..0b632fb1f9 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,8 @@ updates: - dependency-name: twitter/bootstrap versions: - "> 3.4.1" + + - package-ecosystem: docker + directory: / + schedule: + interval: daily diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000000..e7a43be7ab --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,25 @@ +name: PHP + +on: + pull_request: {} + push: + branches: + - master + +jobs: + test: + name: Test + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2.3.3 + + - name: Bring up containers + run: docker-compose up -d + + - name: Initialise Litus + run: docker-compose run --rm php-cli init + + - name: Test response + run: curl -fsSL -I --retry 5 --retry-delay 0 --retry-max-time 30 http://localhost:8080