31 lines
596 B
YAML
31 lines
596 B
YAML
name: Simple CI Pipeline for PHP
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
run: git clone ${{ secrets.REPO_URL }} .
|
|
|
|
- name: Set up PHP (pre-installed environment)
|
|
run: |
|
|
php -v
|
|
composer --version
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer install
|
|
|
|
- name: Run PHP lint
|
|
run: ./vendor/bin/phpcs --standard=PSR12 src/
|
|
|
|
- name: Run PHP tests
|
|
run: ./vendor/bin/phpunit --verbose
|