Skip to content

Build(deps): Bump blamer from 1.0.1 to 1.0.4 #76

Build(deps): Bump blamer from 1.0.1 to 1.0.4

Build(deps): Bump blamer from 1.0.1 to 1.0.4 #76

Workflow file for this run

name: SilverStripe Manticore Search
on:
push:
branches: [ main, updateCodingStandardsTools ]
pull_request:
branches: [ main ]
jobs:
# Install PHP, checkout code, validate composer
CI:
runs-on: ubuntu-latest
services:
manticore:
image: manticoresearch/manticore
ports:
- 9306:9306
- 9308:9308
mysql:
image: mysql:5.7
env:
MYSQL_HOST: 127.0.0.1
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: SS_mysite
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
# Ensure all jobs run
fail-fast: false
matrix:
#php-version: [7.3, 7.4]
php-version: [7.4]
task: ['lint', 'todo', 'duplicate_code', 'phpcs_test', 'phpunit', 'phpstan', 'coverage']
#'todo', 'duplicate'
steps:
- uses: actions/checkout@v2
# Not sure why this happening
- name: Ensure npm cache dir exists
run: mkdir /home/runner/.npm
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'npm'
- name: Setup PHP ${{ matrix.php-version }} with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: curl, dom, gd, intl, json, ldap, mbstring, mysql, tidy, zip
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Set up .env file for database
run: wget "https://raw.githubusercontent.com/silverstripe/github-actions-ci-cd/main/.github/things/.env"
- name: Run PHPCS
if: ${{ matrix.task == 'phpcs_test' }}
run: vendor/bin/phpcs --standard=ruleset.xml --extensions=php --tab-width=4 -sp src tests
- name: Run tests
if: ${{ matrix.task == 'phpunit' }}
run: |
export UNIT_TESTING_CONFIG_ENABLED=1
vendor/bin/phpunit tests
- name: Lint Check
if: ${{ matrix.task == 'lint' }}
run: vendor/bin/parallel-lint src/ tests/
- name: PHP Unit Coverage
if: ${{ matrix.task == 'coverage' }}
run: |
export UNIT_TESTING_CONFIG_ENABLED=1
phpdbg -qrr vendor/bin/phpunit tests --coverage-clover=coverage.xml
bash <(curl -s https://codecov.io/bash) -f coverage.xml
- name: PHPStan
if: ${{ matrix.task == 'phpstan' }}
run: vendor/bin/phpstan analyse --level=8 -c tests/phpstan.neon src/
- name: TODO
if: ${{ matrix.task == 'todo' }}
run: |
npm install leasot
node_modules/leasot/bin/leasot -x tests --ignore **/*.neon
- name: Duplication
if: ${{ matrix.task == 'duplicate_code' }}
run: |
npm install jscpd
node_modules/jscpd/bin/jscpd src
node_modules/jscpd/bin/jscpd tests