Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
coder
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
coder
Commits
3be197cd
Unverified
Commit
3be197cd
authored
4 years ago
by
Klaus Purer
Committed by
GitHub
4 years ago
Browse files
Options
Downloads
Patches
Plain Diff
tests(github): Enable Github Actions testing (
#131
)
parent
18b371d9
Branches
Branches containing commit
Tags
Tags containing commit
Loading
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.github/workflows/testing.yml
+59
-0
59 additions, 0 deletions
.github/workflows/testing.yml
with
59 additions
and
0 deletions
.github/workflows/testing.yml
0 → 100644
+
59
−
0
View file @
3be197cd
name
:
Tests
on
:
push
:
branches
:
[
8.3.x
,
8.x-3.x
]
pull_request
:
branches
:
[
8.3.x
,
8.x-3.x
]
jobs
:
testing
:
name
:
PHP ${{ matrix.php-versions }}
runs-on
:
ubuntu-latest
strategy
:
fail-fast
:
false
matrix
:
php-versions
:
[
'
7.1'
,
'
7.2'
,
'
7.3'
,
'
7.4'
]
phpstan
:
[
'
1'
]
# Extra run to also test on PHP 7.0 without PHPStan.
include
:
-
php-versions
:
'
7.0'
phpstan
:
'
0'
steps
:
-
name
:
Checkout Coder
uses
:
actions/checkout@v2
-
name
:
Setup PHP, with composer and extensions
uses
:
shivammathur/setup-php@v2
with
:
php-version
:
${{ matrix.php-versions }}
extensions
:
mbstring
-
name
:
Get composer cache directory
id
:
composercache
run
:
echo "::set-output name=dir::$(composer config cache-files-dir)"
-
name
:
Cache composer dependencies
uses
:
actions/cache@v2
with
:
path
:
${{ steps.composercache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
key
:
${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys
:
${{ runner.os }}-composer-
-
name
:
Install Composer dependencies
# Running composer install without a lock file will also update cached
# dependencies in vendor.
# We have a dedicated composer.json file for PHP 7.0 that does not have
# PHPStan because it requires >= PHP 7.1.
run
:
|
if [[ ${{ matrix.php-versions }} == "7.0" ]]; then cp composer-php-7-0.json composer.json; fi
composer install --no-progress --prefer-dist --optimize-autoloader
-
name
:
Run PHPUnit
run
:
./vendor/bin/phpunit
-
name
:
Run PHPCS
run
:
./vendor/bin/phpcs
-
name
:
Check custom standard autoloading
# Ensure that a custom standard can be invoked and the auto-loading of
# abstract classes works.
# Ensure that the DrupalPractice standard can be invoked standalone and the
# auto-loading of abstract classes works.
run
:
|
./vendor/bin/phpcs -p --standard=tests/Drupal/phpcs-ruleset.xml tests/Drupal/good/ --ignore=tests/Drupal/good/GoodUnitTest.php
./vendor/bin/phpcs -p --standard=coder_sniffer/DrupalPractice tests/DrupalPractice/good/ --ignore=tests/DrupalPractice/good/GoodUnitTest.php
-
name
:
Run PHPStan
run
:
if [[ ${{ matrix.phpstan }} == "1" ]]; then ./vendor/bin/phpstan analyse; fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment