Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 64 additions & 0 deletions .github/workflows/phpunit-lang.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Language Unit Tests

on:
pull_request:
branches:
- develop
paths:
- 'src/Language/**.php'
- '!src/Language/en/**.php'
- 'phpunit*'
- '.github/workflows/phpunit-lang.yml'
push:
branches:
- develop
paths:
- 'src/Language/**.php'
- '!src/Language/en/**.php'
- 'phpunit*'
- '.github/workflows/phpunit-lang.yml'

jobs:
main:
name: Language Unit Tests
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: composer, phive, phpunit
extensions: intl, json, mbstring, gd, xdebug, xml, sqlite3
coverage: xdebug
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi

- name: Test with PHPUnit
run: vendor/bin/phpunit --verbose --no-coverage --testsuite lang
env:
TERM: xterm-256color
TACHYCARDIA_MONITOR_GA: enabled
2 changes: 1 addition & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<directory>./tests</directory>
<exclude>./tests/Language</exclude>
</testsuite>
<testsuite name="language">
<testsuite name="lang">
<directory>./tests/Language</directory>
</testsuite>
</testsuites>
Expand Down