-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Dark❶ <dark-1@users.noreply.github.com>
- Loading branch information
Dark❶
committed
Feb 5, 2021
1 parent
047563a
commit 0acf122
Showing
14 changed files
with
340 additions
and
180 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,87 @@ | ||
name: Actions CI | ||
|
||
env: | ||
EXTNAME: dark1/usernotificationcontrol # Your extension vendor/package name | ||
SNIFF: 1 # Run code sniffer on your code? 1 or 0 | ||
IMAGE_ICC: 1 # Run icc profile sniffer on your images? 1 or 0 | ||
EPV: 1 # Run EPV (Extension Pre Validator) on your code? 1 or 0 | ||
EXECUTABLE_FILES: 1 # Run check for executable files? 1 or 0 | ||
PHPBB_BRANCH: 3.3.x # The phpBB branch to run tests on | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: # Run tests when commits are pushed to these branches in your repo | ||
- master | ||
pull_request: # Run tests when pull requests are made on these branches in your repo | ||
branches: | ||
- master | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
if: (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')) | ||
runs-on: ubuntu-latest | ||
env: | ||
PHPBB_BRANCH: 3.3.x # phpBB Branch | ||
EXTNAME: dark1/usernotificationcontrol # CHANGE name of the extension HERE | ||
SNIFF: 1 # Should we run code sniffer on your code? | ||
EPV: 1 # Should we run EPV (Extension Pre Validator) on your code? | ||
|
||
steps: | ||
|
||
- name: Actions Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Actions Setup - Copy to Temp Location | ||
run: | | ||
mkdir --parents ../tmp | ||
cp -R . ../tmp | ||
- name: Actions Setup - Clone phpBB | ||
run: | | ||
git clone --depth=1 git://github.com/phpbb/phpbb.git phpBB3 --branch=$PHPBB_BRANCH | ||
- name: Actions Setup - Composer Install/Remove/Require | ||
run: | | ||
cd phpBB3/phpBB | ||
composer install --no-interaction --no-progress --no-suggest --ignore-platform-reqs | ||
composer remove sami/sami --no-interaction --no-progress --ignore-platform-reqs --dev | ||
composer require phpbb/epv:dev-master --no-interaction --no-progress --no-suggest --ignore-platform-reqs --dev | ||
cd ../../ | ||
- name: Actions Setup - Copy from Temp Location | ||
run: | | ||
mkdir --parents phpBB3/phpBB/ext/$EXTNAME/$EXTNAME | ||
cp -R ../tmp/* phpBB3/phpBB/ext/$EXTNAME/$EXTNAME | ||
- name: Actions Test - Code Sniffer | ||
run: | | ||
cd phpBB3 | ||
sh -c "if [ '$SNIFF' != '0' ]; then phpBB/vendor/bin/phpcs -s --extensions=php --standard=build/code_sniffer/ruleset-php-extensions.xml "--ignore=*/$EXTNAME/tests/*" "--ignore=*/$EXTNAME/vendor/*" "phpBB/ext/$EXTNAME"; fi" | ||
cd ../ | ||
- name: Actions Test - EPV (Extension Pre Validator) | ||
run: | | ||
cd phpBB3 | ||
sh -c "if [ '$EPV' != '0' ]; then phpBB/vendor/bin/EPV.php run --dir='phpBB/ext/$EXTNAME' --debug; fi" | ||
cd ../ | ||
# START Basic Checks Job (EPV, code sniffer, images check, etc.) | ||
basic-checks: | ||
if: (!contains(github.event.head_commit.message, '[ci skip]') && !contains(github.event.head_commit.message, '[skip ci]')) | ||
runs-on: ubuntu-18.04 | ||
strategy: | ||
matrix: | ||
include: | ||
- php: '7.1' | ||
db: "none" | ||
NOTESTS: 1 | ||
|
||
name: PHP ${{ matrix.php }} - ${{ matrix.db }} | ||
|
||
steps: | ||
- name: Checkout phpBB | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: phpbb/phpbb | ||
ref: ${{ env.PHPBB_BRANCH }} | ||
path: phpBB3 | ||
|
||
- name: Checkout extension | ||
uses: actions/checkout@v2 | ||
with: | ||
path: phpBB3/phpBB/ext/${{ env.EXTNAME }}/${{ env.EXTNAME }} | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, mysqli, sqlite, pdo_sqlite, intl, gd, exif, iconv, sqlsrv, pdo_sqlsrv, ldap | ||
coverage: none | ||
|
||
- name: Setup environment for phpBB | ||
env: | ||
DB: ${{ matrix.db }} | ||
PHP_VERSION: ${{ matrix.php }} | ||
NOTESTS: '1' | ||
run: .github/setup-phpbb.sh $DB $PHP_VERSION $NOTESTS | ||
working-directory: ./phpBB3 | ||
|
||
- name: Setup EPV | ||
if: ${{ env.EPV != 0 }} | ||
run: composer require phpbb/epv:dev-master --dev --no-interaction --ignore-platform-reqs | ||
working-directory: ./phpBB3/phpBB | ||
|
||
- name: Run code sniffer | ||
if: ${{ env.SNIFF != 0 }} | ||
env: | ||
NOTESTS: '1' | ||
run: .github/ext-sniff.sh $EXTNAME/$EXTNAME $NOTESTS | ||
working-directory: ./phpBB3 | ||
|
||
- name: Check image ICC profiles | ||
if: ${{ env.IMAGE_ICC != 0 }} | ||
run: .github/check-image-icc-profiles.sh | ||
working-directory: ./phpBB3 | ||
|
||
- name: Check executable files | ||
if: ${{ env.EXECUTABLE_FILES != 0 }} | ||
run: .github/ext-check-executable-files.sh ./ $EXTNAME/$EXTNAME | ||
working-directory: ./phpBB3 | ||
|
||
- name: Run EPV | ||
if: ${{ env.EPV != 0 }} | ||
run: phpBB/vendor/bin/EPV.php run --dir="phpBB/ext/$EXTNAME/" --debug | ||
working-directory: ./phpBB3 | ||
# END Basic Checks Job |
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
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
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
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
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
Oops, something went wrong.