Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Add GitHub Actions CI workflow
Browse files Browse the repository at this point in the history
This workflow should ensure that the project is installable and the
Composer configuration is valid.
  • Loading branch information
Sasha Gerrand committed Apr 20, 2022
1 parent bba6c85 commit 0d2cc68
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [ main]
pull_request:
branches: [ main ]

jobs:
tests:
name: Tests

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
env:
- AUTOLOAD=0
- AUTOLOAD=1
php-version:
- "7.4"
- "8.0"
- "8.1"

steps:
- uses: actions/checkout@master

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-version }}
coverage: xdebug

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('composer.json') }}

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

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

0 comments on commit 0d2cc68

Please sign in to comment.