Skip to content

Commit

Permalink
Setup GitHub actions (#9)
Browse files Browse the repository at this point in the history
* Setup GitHub actions PR pipeline that runs phpunit and phpcs
  • Loading branch information
vadymtsots authored Dec 20, 2024
1 parent dfa3be3 commit e466030
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Image Comparator PR pipeline

on:
pull_request:
types:
- assigned
- opened
- reopened
- review_requested
- synchronize

jobs:
phpunit:
runs-on: ubuntu-24.04

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

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

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

- name: Run PHPUnit tests
run: ./vendor/bin/phpunit --testsuite=unit

phpcs:
runs-on: ubuntu-24.04

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

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

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

- name: Run PHP CodeSniffer
run: ./vendor/bin/phpcs -p .

0 comments on commit e466030

Please sign in to comment.