Skip to content

Move epv prep, check paths #4

Move epv prep, check paths

Move epv prep, check paths #4

Workflow file for this run

name: PHP Composer
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
simple-checks:
strategy:
matrix:
include:
- db: 'none'
php: '8.1'
NOTESTS: 1
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }} - ${{ matrix.db }}
env:
DB: ${{ matrix.db }}
PHP_VERSION: ${{ matrix.php }}
EXTNAME: "gn36/firstpostedit" # CHANGE name of the extension HERE
GITREPO: "gn36/phpbb-ext-firstpostedit"
SNIFF: "1" # Should we run code sniffer on your code?
IMAGE_ICC: "1" # Should we run icc profile sniffer on your images?
EPV: "1" # Should we run EPV (Extension Pre Validator) on your code?
PHPBB_BRANCH: "3.3.x"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, intl, gd, exif, iconv
coverage: none
- name: Validate composer.json and composer.lock
# Could be --strict if warnings should be errors, but then version number is an error...
run: composer validate
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
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: prepare EPV
run:
pwd
travis/prepare-epv.sh $NOTESTS $NOTESTS
- name: Setup phpBB
run:
travis/prepare-phpbb.sh $PHPBB_BRANCH
cd ../../phpBB3
.github/prepare-extension.sh $EXTNAME $PHPBB_BRANCH
.github/setup-phpbb.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- name: Setup database
run:
pwd
.github/setup-database.sh $DB $TRAVIS_PHP_VERSION $NOTESTS
- name: Run sniffer
run:
.github/ext-sniff.sh $DB $TRAVIS_PHP_VERSION $EXTNAME $NOTESTS
- name: Run ICC check
run:
.github/check-image-icc-profiles.sh $DB $TRAVIS_PHP_VERSION
- name: Run EPV
run:
phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME/'
# - name: Run test suite
# TODO: Setup and run phpunit tests