Skip to content

Commit

Permalink
Merge pull request #192 from localgovdrupal/feature/191-update-tests-…
Browse files Browse the repository at this point in the history
…specific-to-repo

Update Github actions configuration to try to test against PHP 7.4 an…
  • Loading branch information
finnlewis authored Apr 8, 2022
2 parents 4eb2dea + e54a89a commit 37af85e
Showing 1 changed file with 17 additions and 21 deletions.
38 changes: 17 additions & 21 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- localgov-version: "2.x"
drupal-version: "~9.1"
php-version: "7.4"
localgov-version: ["2.x"]
drupal-version: ["~9.1"]
php-version: ["7.4","8.1"]

steps:

Expand Down Expand Up @@ -90,10 +89,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- localgov-version: "2.x"
drupal-version: "~9.1"
php-version: "7.4"
localgov-version: ["2.x"]
drupal-version: ["~9.1"]
php-version: ["7.4","8.1"]

steps:

Expand All @@ -108,12 +106,12 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-version }}

- name: Run coding standards checks
run: |
cd html
./bin/phpcs -p
./bin/phpcs -p web/modules/contrib/${{ github.event.repository.name }}
phpstan:
name: Deprecated code checks
Expand All @@ -123,10 +121,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- localgov-version: "2.x"
drupal-version: "~9.1"
php-version: "7.4"
localgov-version: ["2.x"]
drupal-version: ["~9.1"]
php-version: ["7.4","8.1"]

steps:

Expand All @@ -141,12 +138,12 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-version }}

- name: Run deprecated code checks
run: |
cd html
./bin/phpstan analyse -c ./phpstan.neon ./web/profiles/contrib/localgov/ ./web/modules/contrib/localgov_*
./bin/phpstan analyse -c ./phpstan.neon ./web/modules/contrib/${{ github.event.repository.name }}
phpunit:
name: PHPUnit tests
Expand All @@ -156,10 +153,9 @@ jobs:
strategy:
fail-fast: false
matrix:
include:
- localgov-version: "2.x"
drupal-version: "~9.1"
php-version: "7.4"
localgov-version: ["2.x"]
drupal-version: ["~9.1"]
php-version: ["7.4","8.1"]

steps:

Expand Down Expand Up @@ -187,4 +183,4 @@ jobs:
# environmental variables, so it's necessary to change the config file directly.
sed -i "s#http://localgov.lndo.site#http://drupal#" ./html/phpunit.xml.dist
docker exec -t drupal bash -c 'chown docker:docker -R /var/www/html'
docker exec -u docker -t drupal bash -c "cd /var/www/html && ./bin/paratest --processes=4"
docker exec -u docker -t drupal bash -c "cd /var/www/html && ./bin/paratest --processes=4 web/modules/contrib/${{ github.event.repository.name }}"

0 comments on commit 37af85e

Please sign in to comment.