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

Commit

Permalink
Merge pull request #1 from duffelhq/ci
Browse files Browse the repository at this point in the history
CI: Add GitHub Actions workflow
  • Loading branch information
sgerrand authored Apr 20, 2022
2 parents bba6c85 + 0d2cc68 commit e393f51
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 e393f51

Please sign in to comment.