29 lines
576 B
YAML
29 lines
576 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
|
|
run: sudo apt update && sudo apt install php-cli composer -y
|
|
|
|
- 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
|