Skip to content

Instantly share code, notes, and snippets.

@robbens
Created May 19, 2020 05:21
Show Gist options
  • Save robbens/534e9df436593814237fe32eca7e5b2c to your computer and use it in GitHub Desktop.
Save robbens/534e9df436593814237fe32eca7e5b2c to your computer and use it in GitHub Desktop.
name: run-tests
on:
# Trigger the workflow on push or pull request,
# but only for the master branch
push:
branches:
- master
pull_request:
branches:
- master
# Also trigger on page_build, as well as release created events
page_build:
release:
types: # This configuration does not affect the page_build event above
- created
jobs:
test:
runs-on: ubuntu-latest
name: Run tests
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: 7.4
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none
- name: Install composer
run: |
curl -sS https://getcomposer.org/installer | php
rm /usr/local/bin/composer
mv composer.phar /usr/local/bin
- name: Install dependencies
run: |
composer install --prefer-dist
- name: Execute tests
run: vendor/bin/phpunit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment