Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added ci.yml #1

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open
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
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Build and Test

on:
push:
branches:
- main
pull_request:
branches:
- master
- php-workflows-poc

jobs:
build:
runs-on: ubuntu-latest
container:
image: php:7.1-fpm

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

- name: Install libzip and PHP extensions
run: |
apt-get update
apt-get install -y libzip-dev zip unzip
docker-php-ext-configure zip
docker-php-ext-install zip

- name: Install Composer
run: |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php composer-setup.php --install-dir=/usr/local/bin --filename=composer
php -r "unlink('composer-setup.php');"
composer --version

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Compile build
run: find . -name "*.php" ! -path "./vendor/*" | xargs -n 1 php -l || exit 1

- name: Run tests
run: ./vendor/bin/phpunit
Loading