Skip to content

Commit

Permalink
Add GitHub Actions (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
matriphe authored Mar 17, 2024
1 parent 6b08afc commit 4c41956
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/test-pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Test

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
run-test:
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-version:
- "8.3"
- "8.2"
- "8.1"

name: PHP ${{ matrix.php-version }}
runs-on: ${{ matrix.operating-system }}

steps:
- uses: actions/checkout@v3

- name: Validate composer.json and composer.lock
run: composer validate --strict

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-${{ matrix.php-version }}
- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test
run: vendor/bin/phpunit

0 comments on commit 4c41956

Please sign in to comment.