This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from duffelhq/ci
CI: Add GitHub Actions workflow
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |