Merge pull request #1712 from openfintechio/ecommpay-new-logo #3976
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
name: Validate | |
on: | |
workflow_call: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
jobs: | |
prepare: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '7.1' | |
- name: Cache | |
uses: actions/cache@v2 | |
with: | |
path: | | |
vendor | |
bin | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install dependencies | |
run: | | |
export PATH="$HOME/.composer/vendor/bin:$PATH" | |
composer self-update | |
composer install -o --ignore-platform-reqs | |
- name: Validate composer.json and composer.lock | |
run: composer validate --strict | |
validate-json: | |
needs: prepare | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
vendor | |
bin | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Run validate | |
run: ./etc/validate.sh | |
phpunit: | |
needs: validate-json | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v2 | |
with: | |
path: | | |
vendor | |
bin | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Run PHPUnit Tests | |
uses: php-actions/phpunit@v3 | |
with: | |
version: 9.6.8 | |
memory_limit: 1G | |
configuration: phpunit.xml |